MPEG and HD video decoding via hardware
  • Jim
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Jim
    Posts: 4977 from 2009/1/28
    From: Delaware, USA
    When PC still had reflectively low power processor and video cards did not provide encoding/decoding functions I had several Dxr2 and Dxr3 MPEG decoders cards. These cards really help offload these CPU intensive tasks making the systems much more responsive.
    While our current CPUs can handle standard def video fairly well (although with a high CPU load), HD video decoding is difficult or impossible on our current G4 based systems.
    As I still believe we could benefit from a decoder card, I'd like to explore adding one to a Powermac system once they're supported.

    I think we could lower our CPU load on standard def decoding and make HD decoding a real possibility while leaving enough CPU cycles to still keep our systems responsive.

    What do you all think?
    "Never attribute to malice what can more readily explained by incompetence"
  • »15.09.10 - 20:59
    Profile
  • Moderator
    Golem
    Posts: 766 from 2003/2/28
    From: Denmark
    Dunno.. have you looked into which cards are available with open documentation?
  • »15.09.10 - 21:11
    Profile Visit Website
  • Jim
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Jim
    Posts: 4977 from 2009/1/28
    From: Delaware, USA
    Right now I can get open documentation for Linux software for the DXR2 and DXR3.

    I'm still looking at hardware capable of decoding the HD images. If it were available cheap enough a Spurs engine solution might work.
    "Never attribute to malice what can more readily explained by incompetence"
  • »16.09.10 - 23:03
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12085 from 2003/5/22
    From: Germany
    > If it were available cheap enough a Spurs engine solution might work.

    SpursEngine solutions are not that expensive (at least the low-end ones):

    http://www.newegg.com/Product/Product.aspx?Item=N82E16815122015

    AFAIK all SpursEngine cards are only available for PCIe, though.
  • »17.09.10 - 02:23
    Profile
  • Jim
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Jim
    Posts: 4977 from 2009/1/28
    From: Delaware, USA
    I didn't realize the price had come down so much (you don't want to know what they offered me this card for before release)/

    The fact that its PCIe is a definite problem though.

    There are other potential hardware solutions.
    "Never attribute to malice what can more readily explained by incompetence"
  • »17.09.10 - 17:50
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12085 from 2003/5/22
    From: Germany
    > I didn't realize the price had come down so much

    In the EU this card can be purchased for a minimum of about 175 EUR at the moment. Interestingly, that's 12% more expensive than it was 1.5 years ago when it started being listed:

    http://www.heise.de/preisvergleich/eu/?phist=417299
  • »17.09.10 - 19:41
    Profile
  • Jim
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Jim
    Posts: 4977 from 2009/1/28
    From: Delaware, USA
    Well, the card in the US is so low I'm thinking of buying one foe my windows machine.

    But the PCIe interface makes it fairly useless om a MorphOS platform.

    I've got info on some alternatives, but its going to take awhile to sort through the data on these.
    "Never attribute to malice what can more readily explained by incompetence"
  • »18.09.10 - 03:18
    Profile
  • Jim
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Jim
    Posts: 4977 from 2009/1/28
    From: Delaware, USA
    For MorphOS application, I'm currently looking at utilizing an FPGA.
    This project may take awhile as I need know more about how MorphOS handles HD decoding.

    It's odd, I can pick up a board to do this for Windows off the shelf and building the FPGA device I'm considering for a Windows platform would be difficult, but doable.
    Under MorphOS, this is going to be a real challenge.

    My kind of fun.
    Maybe if I'm lucky, I'' be able to get a little assistance from the dev. team on the points that aren't well documented.

    Wish me luck guys, because if this works G4 Powermacs will be able to decode HD video without CPU overload.
    "Never attribute to malice what can more readily explained by incompetence"
  • »18.09.10 - 17:12
    Profile
  • Jim
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Jim
    Posts: 4977 from 2009/1/28
    From: Delaware, USA
    I've already found a PCIe 1X card that performs this decoding on X86 machines. It's cheap!
    I'm going to look into running this via a PCI to PCIe adapter.
    After its running on X86, the real work starts getting it to work on a PPC.

    [ Edited by Jim on 2010/9/30 4:11 ]
    "Never attribute to malice what can more readily explained by incompetence"
  • »19.09.10 - 02:05
    Profile
  • Jim
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Jim
    Posts: 4977 from 2009/1/28
    From: Delaware, USA
    Just a quick update.

    Andreas pointed out the Leadtek card and I think it can be adapted to a PCI slot. It has a Linux development package, so initial software development is possible. But the Codecs supported so far are limited. Nice card to explore the uses of the Spurs Engine, but it may not be practical.

    Golem's right about most other hardware, the software isn't open to development. Most of the hardware I've found focus solely on H.264 and often its designed to be plugged into laptops (although there are PCIe adapters).

    It might be easier to look at an FPGA. There's some open source software for those that might be useful. Still, this sounds like too much work. I don't want to build the board.

    Any ideas, anyone?
    "Never attribute to malice what can more readily explained by incompetence"
  • »30.09.10 - 05:51
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    Quote:

    Jim wrote:

    Any ideas, anyone?


    The "natural" way of doing this nowadays is using the GPU... Whose innards are unknown outside of Windows. But then, how come that the open source VLC software is able to use the GPU for cideo decoding?

    Perhaps the functions used for decoding are not new, and were accesible since long ago.
  • »30.09.10 - 10:28
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12085 from 2003/5/22
    From: Germany
    > the GPU... Whose innards are unknown outside of Windows. But then, how come
    > that the open source VLC software is able to use the GPU for cideo decoding?

    "The most common API's for GPU accelerated video decoding are [...] VDPAU, VAAPI, XvMC, and XvBA for Linux and UNIX based operating-system. All except XvMC are capable of decoding videos encoded with MPEG-1, MPEG-2, MPEG-4 ASP (MPEG-4 Part 2), MPEG-4 AVC (H.264 / DivX 6), VC-1, WMV3/WMV9, Xvid / OpenDivX (DivX 4), and DivX 5 codecs, while XvMC is only capable of decoding MPEG-1 and MPEG-2."
    http://en.wikipedia.org/wiki/Graphics_processing_unit#GPU_accelerated_video_decoding

    So it seems that the Linux version of VLC uses one (or several) of these APIs to access a (proprietary and closed source?) driver which in turn accesses the GPU.

    VideoLAN Wiki says:

    "On Linux, there is code for VDPAU and VAAPI. There is also some code for a VAAPI video output, that isn't merged in the current Git."
    http://wiki.videolan.org/VLC_GPU_Decoding#Linux

    Some more there: http://wiki.videolan.org/VLC_VAAPI
  • »30.09.10 - 10:42
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    If *nix guys have APIs to talk to GPUs, why don't we? What else do they have that we don't?

    MorphOS coders for sure have the balls!

    Could it be those "blob" binary drivers for Linux that nVidia provides, that are closed boxes and thus unusable for other systems? But then... Could those be hacked? How do those "blobs" work? Perhaps nVidia just gives some fixed position pointers for the (obscure) functions they contain?
  • »30.09.10 - 15:54
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12085 from 2003/5/22
    From: Germany
    > If *nix guys have APIs to talk to GPUs, why don't we?

    We have. A MorphOS 2D program doesn't talk to the graphics driver directly but to the API provided by the 2D graphics subsystem of MorphOS, i.e. CGX, which in turn accesses the graphics driver to talk to the GPU.

    > Could it be those "blob" binary drivers for Linux that
    > nVidia provides, that are closed boxes and thus unusable
    > for other systems?

    Not only nVidia but also AMD/ATI, Intel, S3 and others.

    > How do those "blobs" work?

    Like any other closed source object file that is loaded into the Linux kernel.
  • »30.09.10 - 16:23
    Profile
  • Jim
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Jim
    Posts: 4977 from 2009/1/28
    From: Delaware, USA
    Also, while I believe the Rdadeon 8500 and 9XXX cards many support this type of decoding, how good are they (or indeed any GPU) at it?

    I also went back to look at Simga Designs based decoder cards like the Hollywood or the DXR3, but Linux drivers usually just use these to output/display a mpeg file (rather than enable the loop back feature). Card's based on Sigma's Mpeg4 decoders (which also decoder Mpeg 1&2) do not have available open drivers (blame Dvix).
    "Never attribute to malice what can more readily explained by incompetence"
  • »30.09.10 - 20:02
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12085 from 2003/5/22
    From: Germany
    > Andreas pointed out the Leadtek card and I think it can be adapted to a PCI slot.
    > It has a Linux development package, so initial software development is possible.
    > [...] Nice card to explore the uses of the Spurs Engine

    Interesting comment by phoenixkonsole:

    "On the Amiga Event someone told me about VideoEditing and the SpursEngine... well i found SpursEngine and PowerXcell.... i'm investigating this possibility for AROS."
    http://amigaworld.net/modules/newbb/viewtopic.php?topic_id=32507&forum=33&start=60#583151

    Potential AROS drivers, if open source, could be ported to MorphOS I guess.
  • »06.10.10 - 23:13
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    Quote:

    Jim wrote:

    how good are they (or indeed any GPU) at decoding?


    I can't understand that question Jim. How good? Well, my brother know a thing or two about codecs, and the monsstruous amount of mathematical operations involved in decoding. That's why his jaw dropped right to the floor when he saw his new PC playing high definition video with amost ZERO CPU usage...

    Quote:

    Andreas_Wolf wrote:

    Potential AROS drivers, if open source, could be ported to MorphOS I guess.


    Interesting. But really applicable outside AROS? Also, those SpursEngine cards might become obsolete by the time the software is ready.
  • »07.10.10 - 08:54
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12085 from 2003/5/22
    From: Germany
    > really applicable outside AROS?

    Why not?

    > those SpursEngine cards might become obsolete
    > by the time the software is ready.

    The PxVC1100 is, at least to my knowledge, the cheapest SpursEngine card currently on the market. That's why I pointed that one out to Jim. There're some more, present and future. For instance, Leadtek recently announced the HPVC1111:

    http://www.tcmagazine.com/tcm/news/hardware/30202/leadtek-develops-quad-chip-spursengine-image-processing-card
    http://en.akihabaranews.com/59786/peripherals/boost-your-desktop-video-processing-power-with-leadtek-latest-4x-spursengine-card
    http://www.leadtek.com/eng/platform_solution/overview.asp?pronameid=553 (product page)
  • »07.10.10 - 14:49
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    Quote:

    Andreas_Wolf wrote:

    [SpursEngine AROS driver possibility]

    > really applicable outside AROS?

    Why not?


    Dunno... I was thinking about some kind of hypothetical dependency with its Windows driver. Of course, that would only rule on a hosted version of AROS. Nevermind, this is talking about software that doesn't exist, for a very rare accelerator card.
  • »08.10.10 - 07:22
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12085 from 2003/5/22
    From: Germany
    >>> really applicable outside AROS?

    >> Why not?

    > I was thinking about some kind of hypothetical dependency
    > with its Windows driver. Of course, that would only rule on a
    > hosted version of AROS.

    I really don't understand. Could you go in more detail?
  • »08.10.10 - 12:38
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    Quote:

    Andreas_Wolf wrote:

    I really don't understand. Could you go in more detail?


    Erm... Actually, I can't. I simply supposed that the possibility of that driver on MorphOS (via AROS via Windows) was all too rosy to be true!

    In all, it's a pity GPU makers hide documentation. Because the normal thing to do to fulfill this thread's subject is using the GPU every modern computer has.
  • »08.10.10 - 13:16
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12085 from 2003/5/22
    From: Germany
    >> Could you go in more detail?

    > I simply supposed that the possibility of that driver on MorphOS
    > (via AROS via Windows) was all too rosy to be true!

    I have no clue how easy or hard it would be to do an AROS driver for the SpursEngine cards, but you can take it that an open source AROS driver would not be too hard to port to MorphOS.
  • »08.10.10 - 16:36
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12085 from 2003/5/22
    From: Germany
    Update:

    > Interesting comment by phoenixkonsole: "On the Amiga Event someone
    > told me about VideoEditing and the SpursEngine... well i found SpursEngine
    > and PowerXcell.... i'm investigating this possibility for AROS."

    And another one:

    "I am experimenting with a powerxcell in my Aros box"
    http://amigaworld.net/modules/newbb/viewtopic.php?topic_id=32569&forum=7&start=200#584854
  • »20.10.10 - 15:58
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Simon
    Posts: 809 from 2008/7/6
    From: Antwerp, Belgium
    didn't elbox announce drivers (dxr3) for this long time ago ? http://www.elbox.com/mediator_driver_guide.html

    They are mentioned, but still in development ... I doubt that is going to change. And would you need them above 800Ghz CPU's ?

    I still have two of these cards, if someone wants them to do a driver...

    [ Edited by Oepabakkes on 2010/10/21 14:31 ]
    Proud member of the Belgian Amiga Club since 2003

  • »21.10.10 - 12:25
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12085 from 2003/5/22
    From: Germany
    > They are mentioned, but still in development ... I doubt that is going to change.

    Me too. These drivers are mentioned on that page since at least January 2002(!):

    http://web.archive.org/web/20020202131131/http://www.elbox.com/mediator_driver_guide.html#MPEG

    > would you need them above 800Ghz CPU's ?

    Definitely not ;-)
  • »21.10.10 - 12:42
    Profile