Slashdot Mirror


Hardware-Based Video Acceleration Coming To Linux

sammydee writes "Phoronix reports that GPU based video decoding acceleration will be implemented in Gallium3d sometime this year. Drivers currently using Gallium3d include the open source nouveau driver for NVIDIA cards and experimental Intel GMA drivers. This is definitely good news for anybody who has ever tried to play high-definition 1080p content on any CPU older than about a year."

21 of 143 comments (clear)

  1. Already there by bconway · · Score: 5, Informative

    nVidia's binary drivers and X.org's Intel drivers have had XvMC support for well over a year. I've been using both card successfully with Xine and accelerated 1080p video. I think the news here is that the nouveau project is catching up, but that's hardly clear from the article.

    --
    Interested in open source engine management for your Subaru?
    1. Re:Already there by krgallagher · · Score: 2, Informative
      "I think the news here is that the nouveau project is catching up, but that's hardly clear from the article."

      I copied this from Wikipedia:

      Gallium 3D will provide a unified API exposing standard hardware functions such as shader units found on modern hardware. Thus, 3D APIs such as OpenGL 1.x/2.x, OpenGL 3.x, OpenVG, GPGPU infrastructure or even Direct3D (as found in the Wine compatibility layer) will need only a single back-end, called state tracker, targeting Gallium 3D API. By contrast Mesa 3D requires a different backend for each hardware platform, and several other APIs need translation to OpenGL at the expense of further overhead.[1][2][3] In addition, using the modular structure of Gallium 3D, there are works underway to leverage the LLVM compiler suite and create a module to optimize shader code on the fly

      I'm no expert, in fact this is a little out of my league, but I think it means that hardware drivers can expose a common implementation of system calls for 3d API's to use. It provides more standardization and allows more of the processing to be passed off to the GPU instead of handled by the CPU. If I missed the concept here, someone with better understanding please explain it to us "non-techies."

      --

      Insert Generic Sig Here:

    2. Re:Already there by Anonymous Coward · · Score: 1, Informative

      Current nVidia drivers (as in > 100.xx.yyyy) have broken support for XvMC.
      XvMC only accelerates MPEG2 video playback (which any CPU with less than 2 yrs can handle easily even at 1080p). XvMC has no support for H.264, WMV, MPEG4, etc.

      There's also a new video acceleration API, but still in planning stage. See http://en.wikipedia.org/wiki/VAAPI .

      If you don't own a fast Core 2 Duo, you'll have a hard time playing H.264 at 1080p in linux. Or even 720p with some recently encoded footage and a slower processor.

      So, Gallium 3d + Noveau is good news. At last...

  2. Google summer of code... by MMC+Monster · · Score: 4, Informative

    This is apparently a google summer of code project.

    While I am hopeful, let's not write this one on stone until it's released.

    --
    Help! I'm a slashdot refugee.
  3. Re:Don't know what to say ... by Fweeky · · Score: 3, Informative

    If it's any consolation, GPU accelerated playback on Windows doesn't work all that often, and open source codecs/players tend to be the better ones there speed and support wise, acceleration or no.

  4. Speaking of Xine by DrYak · · Score: 4, Informative

    Xine has supported hardware accelerated DVD video (MPEG1/2) decoding using EM8300 based cards like Sigma Design's Holywood+ and Creative's DXR3, since about 2000.
    (But that was done using an ad-hoc module inside Xine, not using generic APIs like XvMC or the future Gallium3d video)

    The Gallium3D Video API is a good news, because it'll probably be able to address shortcommings that XvMC has.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  5. Re:Extremely stupid by gEvil+(beta) · · Score: 4, Informative

    Basically history is repeating itself. When DVDs first came out, MPEG-2 decoding was done on the CPU. Then video cards started having hardware supported MPEG-2 decoding. Now that we have the HD video codecs (AVC, VC-1, hires MPEG-2), we went back to square one (especially with AVC and VC-1, which require some pretty heavy lifting). In the past couple of years, video cards have added hardware support for those tasks, which otherwise would max out a fairly decent processor (~2GHz dualcore) trying to decode a high bitrate 1080p stream.

    --
    This guy's the limit!
  6. Re:Extremely stupid by somersault · · Score: 4, Informative

    I think the point is that it is CPU dependent if you don't have any assistance from video hardware acceleration, as is the case if your video drivers are incomplete.

    --
    which is totally what she said
  7. Re:Extremely stupid by LarsG · · Score: 2, Informative

    That the hardware supports it does not mean that the driver supports it.

    --
    If J.K.R wrote Windows: Puteulanus fenestra mortalis!
  8. Re:Windows games by BhaKi · · Score: 1, Informative

    Steam, Half-life and Counter-Strike are running excellently in wine 1.0, with higher stability and performance in wine than in windows!!! Just remember to use the openGL mode, not DirectX mode.

    --
    The largest prime factor of my UID is 263267.
  9. Re:XVMC? by hummassa · · Score: 2, Informative

    IIRC XvMC is only MPEG2 and not AVC (=x264?), VC-1, more common HD codecs.

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
  10. Was there, nearly gone by Jo+Deisenhofer · · Score: 4, Informative

    XvMC does only accelerate MPEG-2, and not many use it, because the de-interlacing you can get sucks. And for MPEG-2, you usually don't need hardware acceleration anyway.
    nVidia, like ATI, are moving away from video overlays and have some pretty nice GPU-based video decoding built into their cards using the GPU (most of it probably implemented as shader programs).
    But you can't use any of that with linux, you are basically down to hardware video scaling, which the newest cards no longer really support.
    It is high time for a new, industry standard API for video. I hope that's what they are doing.

  11. Re:Windows games by WaroDaBeast · · Score: 3, Informative

    I think you meant h.264 -- you were probably thinking about RS-232 for the number.

    And yes, VLC Linux does support h.264 playback, but 1080p videos are likely to display stuttering if not GPU-accelerated: I tested it on my machine, CPU is an Athlon X2 5600+ and GPU is a Geforce 8800GTS; anything up to 720p was fine, but 1080p was unwatchable prior to installing nVidia Purevideo.


    P.S.: Seems 1080i is fine too if not GPU-accelerated.

    --
    "The body may heal, but the mind is not always so resilient." -- Deus Ex: Human Revolution
  12. Re:Don't know what to say ... by Anonymous Coward · · Score: 5, Informative

    Playing a video is no problem.

    The problem is that a high-bitrate 1080p video stream requires a lot of CPU time to decode, and then you have to transfer the whole uncompressed frame out to the video card.

    Unless you have a really high-end CPU, there are no Windows-based video players capable of doing this with just software. They all require some kind of hardware acceleration. The specs for all this are nicely closed up, and are known only to Microsoft, video card manufacturers, and the few companies that implement video decoders (which is probably Microsoft again).

    Video card manufacturers like nVidia have refused to implement any kind of video decoding in their Linux drivers until there's an appropriate spec. They won't tell anyone what they're hardware is actually capable of, so nobody else can write a spec. We can't even reference Microsoft's basic design, because it's all closed off and secret.

    Oh, and most of it doesn't even work properly in Windows either. I've never managed to get it to work at all, and benchmarks I've seen seem to suggest that it's really only offloading 10% or so of the workload. Just enough to make the difference between working and not working, but not as much as it could be.

    The Gallium guys are planning to implement the entire thing in their video drivers, using only the 3D capabilities that video cards are known to have. That neatly bypasses the whole thing, but required that we have a single base driver to work with (which Gallium provides), and one or more video drivers actually using it (which, again, Gallium provides).

    I kind of hope that Gallium implements something similar to nVidia's CUDA - a programming model for running stuff on graphics cards that doesn't rely on graphics-related stuff like textures or polygons. That way, we'd have a way to implement different kinds of video decoders, encoders, or even things like physics simulations. Bonus points if it can be made compatible with something available on Windows...

    That said... Linux video players tend to be a hell of a lot quicker than Windows video players. I've played videos in Linux that were impossible to play in Linux.

  13. Re:Not 1 year by sricetx · · Score: 4, Informative

    If you are running Windows and using the manufacturer's drivers for a relatively recent (last few years) video card, then yeah, everything should be peachy. But if you are using open source video card drivers under Linux then good luck. Even with the proprietary Nvidia driver, highdef video playback can max out a fairly new CPU. http://www.mythtv.org/wiki/index.php/HD_Playback_Reports will give you an indication about the type of setup you need to get HD video playback to work.

  14. Re:What about software? by puto · · Score: 4, Informative

    VLC works great for me on the windows boxes I use for my home media system. Plays HD contect fine.

    The one in the living room is a Core2 1.8 with 1.5 of ram with an ATI 2400 HD card and no problems with HD acceleration in XP.

    I do not game much, so this 59 dollar HD card has been great.

    Workstation is same setup, with two gigs of ram and vista, no problems with HD video.

    Server side is a linux box which runs headless. /all rooms have a pc attached to the tv /my guests can surf the web, watch movies, videos /or grab a wireless rumblepad and play any mame game of their choosing.

    --
    The Revolution Will Not Be Televised
  15. Re:Not 1 year by neumayr · · Score: 3, Informative

    Hm. My 2x2.6ghz AMD64 CPU can't do it. On Linux, with Nvidia's GPU driver.
    Don't know if I've missed something, but it seems your video decoding is GPU accelerated.

    --
    Truth arises more readily from error than from confusion. -Francis Bacon
  16. Re:PS3 and future possibilites by Slashcrap · · Score: 2, Informative

    PS3 Linux has slow video because Sony blocks access to 2D and 3D acceleration on the Nvidia chipset. This project uses 3D shaders to accelerate video decoding. So I'm struggling to see how using advanced 3D functionality that PS3 Linux doesn't have to replace basic 2D functionality that PS3 Linux doesn't have is going to help.

  17. Re:Extremely stupid by serviscope_minor · · Score: 2, Informative

    Actually, there's an extra flip-flop step in there. When DVD's FIRST came out, hardware decoders were quite common. I remember DVD drives commonly coming with PCI hardware decoders (the RealMagic Hollywood+ was common) because at the time, many home computers simply didn't have the horsepower to pull off real-time MPEG2 decoding. My computer system when I got my first DVD drive was an AMD K6-2 450Mhz and software encoders couldn't keep up and I'd get occasional video stuttering. My hardware DVD decoder card kept up with the video just fine though.

    There's another factor: better software. When I first started regularly watching TV and DVDs on my computer (Dual 866MHz P3), dvd playback was quite expensive and real-time encoding from the TV was right out. After a few years ffmpeg improved to such a point that playback used little CPU and real-time encoding from the TV was a reasonable proposition. The ffmpeg software codecs have been getting consistently faster and more efficient for quite a few years. These days, with improved scheduling and better software, I expect you could play DVDs smoothly on that old K6-2@450 with no problem.

    --
    SJW n. One who posts facts.
  18. Re:What about software? by PitaBred · · Score: 2, Informative

    It may be with your filesystem, drives or possibly just NVidia. An Athlon X2 4600+ drives 1080p video for me fine, but I use an RS690 embedded chip (AMD x1250).

  19. Re:Not 1 year by Anonymous Coward · · Score: 2, Informative

    No, MythTV uses it's own built-in player (which I think is based on ffmpeg) for playing videos which definitely isn't mplayer. Now, you can set it up to use external players (such as mplayer) if you want to, but that isn't the default option.