Jump to content

Kickstarter: Allwinner VPU support in the official Linux kernel


Xalius

Recommended Posts

3 hours ago, Tido said:

Is it ready for production of MPEG2 and h264 on the A20 and H3 platform or is it still proof-of-concept?

MPEG2 is with latest version definitely production quality while H264 is not. You must understand that MPEG2 is very simple codec. It seems that focus shifted to H265 because Paul has a contract only until end of August. Fortunately, H264 and H265 share some common features, so work on H265 will definitely help with H264.

 

However, it turns out that ffmpeg + vaapi doesn't work well for some not so well formed MPEG2 files (same issues with Intel vaapi + ffmpeg), while purely SW ffmpeg decoding works well. I kinda started working on direct ffmpeg integration, but I'm not sure if I have enough motivation to actually finish it.

Link to comment
Share on other sites

Thank you Jernej for your detailed explanation, this does confirm what I expected back in June

On 6/11/2018 at 10:35 AM, Tido said:

Looking at the tables, reading their campaign and stretch goals (by Dec 2018) it looks to me A10, A20, A33 are not yet there with supporting widely used software like: VLC, GStreamer and MPV, while working already on their stretch goal with KODI and H3 SoC according to the latest blog entry.

 

So, I am wondering what can be expected at the end of June as Estimated Delivery on their Kickstarter Campaign for A10, A20, A33 ?

 

Following their blog, Maxime knows quite a bit about h264 - could be one of the reason Paul is focusing on h265, but 

--  business is business and to their customers on kickstarter they offered to fix h264 until June  --

Really sad to see as it is their statement: Implementing H264 video decoding, since H264 is by far one of the most popular video codec.

 


 

On 8/18/2018 at 11:47 AM, jernej said:

kinda started working on direct ffmpeg integration

does this mean to leave away Video Acceleration API (VA API) and direct access to the VPU ?

 

Link to comment
Share on other sites

48 minutes ago, Tido said:

does this mean to leave away Video Acceleration API (VA API) and direct access to the VPU ?

Direct access is a bit strong word. Technically, it means that VAAPI layer would be dropped and same interface as in https://github.com/bootlin/libva-v4l2-request would be used (V4L2 interface with new additions).

 

48 minutes ago, Tido said:

--  business is business and to their customers on kickstarter they offered to fix h264 until June  --

Really sad to see as it is their statement: Implementing H264 video decoding, since H264 is by far one of the most popular video codec.

 

If I understand correctly, "untiling" research took a bit more time than anticipated. Please also note that request API patches (base for AW VPU driver) are at v18 (!) written by multiple people outside Bootlin. But now that V4L2 base (request API) and VPU driver base are more or less finished, it should be much easier to add support for other codecs.

 

BTW, you can actually watch movies with current H264 driver. It just doesn't cover all possible variants and from time to time you can see artifacts. Bigger problem is ffmpeg + VAAPI combination for H264, since you often run out of memory (note that VPU can address only 128 MB of memory and currently DT allocate even less). This problem is know and noted on cedrus wiki page. I hope that using more direct approach in ffmpeg this could be solved.

 

Contrary to you, I'm not disappointed, since the work needed to make stable base is enormous. Framework which support such driver (request API) is evolving along AW VPU driver and AW VPU driver will be it's first user.

Link to comment
Share on other sites

5 hours ago, Tido said:

Really sad to see as it is their statement: 

It is not, that I do not honor what they have done by now, but I was expecting that (with some delay of course) h264 could be built in in such projects like armbian and used with some well known Media-Player. So that people can just use it and watch their movies on their favorite SBC from Allwinner.

 

4 hours ago, jernej said:

would be used (V4L2 interface with new additions)

What tickles you to get that going  versus  doing nothing ?

 

Link to comment
Share on other sites

17 minutes ago, Tido said:

What tickles you to get that going  versus  doing nothing ?

Cons: I never worked on ffmpeg source or V4L2, so there is large amount of code and documentation to research.

Pros: It is the best way to go on for Kodi. It wouldn't even need any change, while for current approach, it needs a patch, which has to be cared for (I''m not sure if approach taken in that patch would be acceptable for upstream Kodi). I think that other problems could also be avoided like excessive buffering...

 

Please don't take that for granted, I don't know ffmpeg well.

Link to comment
Share on other sites

2 hours ago, jernej said:

It is the best way to go on for Kodi.

before you spend a lot of time reading code and documentation, did you come across this posting?

https://bootlin.com/blog/allwinner-vpu-main-goals-delivery/   21. July

After several months of hard work by Bootlin engineer Maxime Ripard and intern Paul Kocialkowski, we now have a working demo of Kodi running with our VPU driver on top of a mainline 4.18-rc kernel. Both MPEG2 and H264 are supported, with a fully-optimized pipeline between the VPU and the display side that does not involve any buffer copy or extra transformation that the hardware cannot offload.

 

On 8/18/2018 at 11:47 AM, jernej said:

MPEG2 is with latest version definitely production quality

up until now this is not part of armbian, right ?

 

Link to comment
Share on other sites

1 minute ago, Tido said:

before you spend a lot of time reading code and documentation, did you come across this posting?

Of course, I'm using Paul's Kodi hack for the moment, but it is proof-of-concept quality.

 

2 minutes ago, Tido said:

up until now this is not part of armbian, right ?

Nope, but it shouldn't be hard to do. I'm maintaining patches for 4.18 for LibreELEC. But truthfully, I didn't test it on anything else than LibreELEC + Kodi on H3. If there won't be any surprises, driver will be merged in 4.20 kernel.

Link to comment
Share on other sites

On 8/20/2018 at 10:09 PM, jernej said:

LibreELEC + Kodi on H3

3 months later...  you mentioned H3, Kodi & libreELEC, are you a developer at libreELEC or is it just your personal spare-time-project ?

 

Link to comment
Share on other sites

2 minutes ago, Tido said:

developer at libreELEC or is it just your personal spare-time-project

Why it can't be both? I have commit rights for LE and I'm maintainer of allwinner branch (until it's merged in master). And everything I do is in my spare time. As it is the case for any other LibreELEC developer.

 

And 4.20 will be out around Christmas, so I guess I'll merge all HW decoding related patches to allwinner branch around then. But you can get my WIP stuff from my github.

 

BTW, merged version won't use libva-v4l2-request, but native ffmpeg integration.

Link to comment
Share on other sites

4 minutes ago, jernej said:

Why it can't be both?

fair enough, I was a bit fuzzy to express my mind :wacko:

 

6 minutes ago, jernej said:

but native ffmpeg integration

so you finally went down that rabbit hole ?  :o

 

H3, I have an ugly BPi M2 plus. Should it work on that as well ?

Link to comment
Share on other sites

2 hours ago, Tido said:

so you finally went down that rabbit hole ?

Yes, but I'm not the original author. That would be another LE developer. But I help him.

 

2 hours ago, Tido said:

H3, I have an ugly BPi M2 plus. Should it work on that as well ?

Yes, if board is supported in U-Boot and Linux kernel, adding support for it is easy, just one line. BPI M2+ is not yet added, but it's trivial to do so. But please don't expect wifi to work out of the box. Patches for that are currently WIP by Chen-Yu.

Link to comment
Share on other sites

I know this wasn't in the original crowd funding goal set, but...

 

I was wondering how difficult adding H6 support would be?  It supports VP9, and 10 bit h.265 at 60fps/4k, as well as HDMI2.0 output, so it is perhaps of more interest for some?

Link to comment
Share on other sites

1 hour ago, TimSmall said:

I was wondering how difficult adding H6 support would be? 

I'll try to add support for it soon. But it will be in the same boat as others at first. Don't expect to have 10 bit HEVC support at the beginning. BTW, VP9 is separate peripheral so it needs separate driver. Since nobody did reverse engineering yet, it will take a long time to be supported. However, it seems to be Webm project reference VP9 HW decoder, so there is a great chance that other SoCs from other manufacturers have same unit and someone else might write a driver for it.

Link to comment
Share on other sites

28 minutes ago, Tido said:

So, it is the end of December 2018. I do not follow their github/gitlab, however I haven't heard about any updates on the stretch goal (h265) for a while. Has anybody else some news ?

Allwinner "Cedrus" Driver Moving Ahead With H.264 & H.265 Video Decode Support   and

https://bootlin.com/blog/allwinner-vpu-support-in-mainline-linux-november-status-update/

Link to comment
Share on other sites

Jeee, I totally missed that one:

...It was also decided to hide the associated interface for MPEG-2 decoding from the public kernel headers for now.

....Support for h264, h265 codecs in the API and our driver is still under review and we will continue sending new iterations for them, with the suggested changes and fixes as well as adaptations for the still-evolving decoding interface.

...there seems to be very few obstacles left in the way.

not complete yet.

https://bootlin.com/blog/allwinner-vpu-support-in-mainline-linux-end-of-the-year-status-update/

 

PS: as I have never said that: Paul, thank you for every well-thought written blog - it is always a pleasure to read it.

Link to comment
Share on other sites

Any idea when kernel 5.2 is comming?
I'll try my OPi+2 with 5.0. Cedrus should work on it. I'm curious... It's an H3, I thought H5. No luck.
Thanks for the news.

Link to comment
Share on other sites

6 hours ago, NicoD said:

I'll try my OPi+2 with 5.0. Cedrus should work on it. I'm curious... It's an H3, I thought H5. No luck.

Wrong again, it should support it since 4.20
"Merged into 4.20

A13 / A20 / A33 / H3

Cedrus driver"

I'm checking the build script. But Next is 4.19, with default I get the message "Building Ubuntu Bionic images with selected kernel is not supported".

Any way of building an image with kernel 4.20?
I built an image for it, I could easily install kernel 4.20.8. I messed around a bit, but it's clearly not enough to just install kernel 4.20. I'll look into it more tomorrow to see if I'm able to enable it. I'm not the brightest light when it comes to Linux.

Link to comment
Share on other sites

9 hours ago, NicoD said:

Any idea when kernel 5.2 is comming?
I'll try my OPi+2 with 5.0. Cedrus should work on it. I'm curious... It's an H3, I thought H5. No luck.
Thanks for the news.

 

5.1 RC4 just landed.  The release notes have all been pretty calm, so I'm going to guess it'll only go to RC7
Figure 3 more weeks for 5.1, a 2 week merge window, and potentially 8 weeks for 5.2... so ~3 months puts us end of June / beginning of July

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines