Preliminary Reverse-Engineered VPU Driver (CedarX) for AllWinner A10 Plays H.264 Videos

Allwinner framework for their Video Processing Unit (VPU) in their Cortex A8 processors (A10, A13, etc..) is called CedarX. It relies on a binary blob that is working just fine for Android, but not so well for Linux. So several developers started to reverse-engineer CedarX a while back, to fix issues with Linux, and provide an open source driver.

Yesterday, they upload a video to show the development progress, and show Big Buck Bunny 1080p H.264 playback using libvdpau-sunxi open source driver with mplayer, and without any binary blobs.  The video resize function are not been implemented yet, which is why we can only see the left corner of video, but nevertheless it shows an open source hardware video decoder is on the way.

That means once the Lima driver for Mali-400 GPU, and libvdpau-sunxi driver for AllWinner VPU are implemented (which may still take a while), AllWinner A10 SoC will be mostly open source, and the only SoC with open source hardware video decoding. I guess the only parts that may not be open source are things such as 2D graphics (See comments), the NAND driver (although people are working on that), and maybe a few other parts I’m missing.

Via Olimex Blog.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies or become a Patron on Patreon

ROCK Pi 4C Plus

16 Replies to “Preliminary Reverse-Engineered VPU Driver (CedarX) for AllWinner A10 Plays H.264 Videos”

  1. The nand drivers are also open sourced and in the github. A10 nand sources have been available since the original all winner source drop. A20 nand driver sources were committed about 2 months ago.

  2. CNX, is it possible to purchase the source code of video drivers from a company like allwinner or rockchip (e.g. Quad a9 mali mp4 combo) and then make it open source?

    If so, there might be a case for starting a kickstarter type campaign for a group buy of the code. It’s all well and good to rev engineer , but why not accelerate a solution while the board and chip are still somewhat current in terms of performance.

    If its a matter of a 100,000 usd or there abouts, I’m sure we can raise the money. It’s just a matter of marketing the kickstarter before actual launch by using arm and htpc blogs, websites, channels. Since we are talking about vid drivers mainly, the media centre /htpc gang gets factored in and we are then talking about at least tripling the interested donor base vs pure Linux inclined people.

    Since its basically a buy, the delivery period of the campaign would be minimal, so that makes the campaign more fundable from a layman perspective (I.e. the end is in sight).

    Anyway…dunno if it’s possible to buy the code.

  3. @Belta99
    One short explanation first:
    * Mali-400 – 3D acceleration, and in theory 2D acceleration via OpenVG but apparently not really used. Not sure why.
    * G2D – 2D acceleration (Specific to AllWinner?)
    * CedarX VPU – Video hardware decoding (Should be specific to AllWinner)

    We’ve got at least three piece of silicons and corresponding drivers. Apart from Mali-400, I’m not exactly sure who did the IP and drivers for G2D and CedarX.

    In theory, it would possible to buy the complete company, and make the source code available :). Of course, $100,000 US, would be far too low.

    It doubt it’s possible to buy the source code. But even if it was possible, $100,000 would be extremely difficult to raise, with the only perk being you’ve got open source drivers for this SoC.

  4. @cnxsoft
    O.o I see, it’s a bit more complex than one set of drivers.

    Yes, buying the company would be out of the question ,:)

    I don’t know why but to me raising a 100,000 doesn’t seem like too much or too difficult. You need a 1000 users at $100 or 2000 users at $50, 4000 users at $25. I think there would be a lot more people willing to do this if you pick up a generic popular soc config (e.g. Rockchip 3188 quad with Mali mp4). You then get literally 10s of compatible devices in tablet, phone, stick, stb, board formats, with so many users wanting their devices to do more than their stock closed function.

    If it works out, that particular soc ref design would experience further popularity and hence further sales. Therefore it wouldn’t hurt to line up someone like Andy Kirby of Rikomagic for support in terms of manufacturing contacts for the generic reference design.

    Hmm I assumed it might be possible to buy, since open source project have sprung up when code owners have decided to release their code to the public. In this case we would just be incentivising them to do so.

    Maybe Jinx , Cubie or Davilla , Brad Linder, Charbax is reading this, and gets some ideas. Would be cool to have you and them form a super team.

  5. > a generic popular soc config (e.g. Rockchip 3188 quad with Mali mp4).

    Heh. You know which is generic popular soc? PXA255. It was in damn every PocketPC 10 years ago. Ever heard of PocketPC? Every new kid on the block thinks that whatever crap happens in *this* instant of time makes any difference. No, that’s speed-of-light stream, and tomorrow nobody (including you) will need what you wanted today. That’s the problem behind it.

    However, if you wanted to select “generic popular soc”, the community did its choice – it’s Allwinner A10/A13. WAT? You don’t need that old crap? And yet that’s what’s the most investigated and viable choice is. And don’t look for easy solutions, like somebody pays a little money ($100K, hilarious, that’s salary of *one* man for *one* year). Just start your disassembler and dig into damn proprietary code. Too complicated? Yeah, that’s why it is where it is.

  6. @cnxsoft

    G2D is not for 2d acceleration. it is for window composition.
    You can’t draw lines, rectangles, triangles with G2D.
    basic use case for G2D: use this piece of memory(some picture of window) and copy it here and use alpha channel

    OpenVG can draw lines, rectangles and other 2D objects. If you ever draw something with graphic context
    OpenVG is for 2D and OpenGL is for 3D
    OpenVG can do more 2D stuff. like line patterns, image masks,….
    OpenGL api don’t support anything like this. It is all made with frameworks that use basic opengl API
    I thing taht all what you can do with with SVG and Flash(2D) with pictures, lines, rectangles and other geometries all can be nativly handled with OpenVG => it is hw accelerated or some stuff is emulated in drivers

  7. > OpenVG can do more 2D stuff. like line patterns, image masks,…. OpenGL api don’t support anything like this.

    Are you sure it can’t? Because in many products, OpenVG appear to be an API shim on top of OpenGL(ES). Which also answers why OpenVG is not used widely enough – if you can use OpenGL(ES), why bother with another API (even if it’s simpler/more tailored for 2D).

  8. @Paul
    you can emulate openVG with OpenGL but it is in form of another layer
    effects like line patterns and polygon drawing is more complex.
    It is all sw vs hw.
    Sw layer generate line patterns or something in hw(GPU) handle it for you
    It is same as sw opengl emulation in mesa.

  9. @m][sko

    Can you please provide specific example of OpenVG API call/feature which cannot be (efficiently) implemented in terms of OpenGL? Because your references to line patterns and polygon sound like OpenGL cannot draw a cube with dashed lines or cannot draw a pentagram, all of which it of course can.

  10. @m][sko: Thanks for detailed references, I now see what you mean. Indeed, these “small” things are easy to overlook, but indeed, they pretty important for quality 2D graphics.

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC