Home > AllWinner A1X, Hardware, Linux, Video > Preliminary Reverse-Engineered VPU Driver (CedarX) for AllWinner A10 Plays H.264 Videos

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.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

  1. Diego.
    August 30th, 2013 at 17:56 | #1

    The 2D driver is open source:
    https://github.com/ssvb/xf86-video-sunxifb
    and is much more optimized than the (open source) xf86-video-mali:
    http://ssvb.github.io/2013/02/01/new-xf86-video-sunxifb-ddx-driver.html

  2. pat wood
    August 30th, 2013 at 21:18 | #2

    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.

  3. cb88
    August 31st, 2013 at 01:06 | #3

    It has an open 3d driver too ;-) http://limadriver.org/

    Things look interesting on the rk3188 front as well!

  4. Belta99
    August 31st, 2013 at 15:21 | #4

    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.

  5. August 31st, 2013 at 15:31 | #5

    @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.

  6. Belta99
    August 31st, 2013 at 15:57 | #6

    @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.

  7. Paul
    September 1st, 2013 at 01:35 | #7

    > http://ssvb.github.io/2013/02/01/new-xf86-video-sunxifb-ddx-driver.html

    This guy has really interesting blog, albeit posts are rare. CNX, I’d “repost” this: http://ssvb.github.io/2013/06/27/fullhd-x11-desktop-performance-of-the-allwinner-a10.html (unless of course I was under a stone and this was spread around already).

  8. Paul
    September 1st, 2013 at 01:49 | #8

    > 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.

  9. m][sko
    September 1st, 2013 at 04:04 | #9

    @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

  10. Paul
    September 2nd, 2013 at 02:37 | #10

    > 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).

  11. m][sko
    September 2nd, 2013 at 05:40 | #11

    @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.

  12. Paul
    September 2nd, 2013 at 19:16 | #12

    @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.

  13. m][sko
    September 2nd, 2013 at 21:16 | #13

    @Paul
    http://www.khronos.org/openvg/
    http://www.khronos.org/files/openvg-quick-reference-card.pdf

    tesselation (opengl can draw polygon) – opengl es don’t support tessellation. is it OpenGL 4 future ?
    line stokes – http://www.java2v.com/Code/CSharp/Windows-Presentation-Foundation/StrokeStartLineCap.htm
    diffrent lines – bezier, …
    fonts (glyphs)

    glut and other layers add a lots of functions but it is all sw

  14. m][sko
    September 3rd, 2013 at 18:38 | #14

    from
    http://www.khronos.org/files/openvg-quick-reference-card.pdf
    for example
    polygons – opengl 4.0 and glut support tessellation I think. Opengl es 2.0 don’t
    line drawing elements – stroke join styles like http://www.apl.jhu.edu/~hall/java/Java2D-Tutorial-Images/LineStyles.gif

    most effects are related to lines and polygons effects
    I never saw anything like this in opengl

  15. Paul
    September 4th, 2013 at 02:22 | #15

    @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.

  1. August 30th, 2013 at 22:32 | #1
  2. August 31st, 2013 at 04:41 | #2