Efficiency

So you’re trying to build a DVD player using Debian Jessie and an Atom D2700 on a Poulsbo board, and you’ve even biked down to the used DVD warehouse and picked up a few $3 90′s classics for test materials.  Here’s what will happen next:

  1. Gnome 3 at 1920×1080.  The interface is sluggish even on static graphics.  Video is right out, since the graphics is unaccelerated, so every pixel has to be pushed around by the CPU.
  2. Reduce mode to 1280×720 (half the pixels to push), and try VLC in Gnome 3.  Playback is totally choppy.  Sigh.  Not really surprising, since Gnome is running in composited mode via OpenGL commands, which are then being faked on the low-power CPU using llvmpipe.  God only knows how many times each pixels is getting copied.  top shows half the CPU time is spent inside the gnome-shell process.
  3. Switch to XFCE.  Now VLC runs, and nothing else is stealing CPU time.  Still VLC runs out of CPU when expanded to full screen.  top shows it using 330% of CPU time, which is pretty impressive for a dual-core system.
  4. Switch to Gnome-mplayer, because someone says it’s faster.  Aspect is initially wrong; switch to “x11″ output mode to fix it.  Video playback finally runs smooth, even at full screen.  OK, there’s a little bit of tearing, but just pretend that it’s 1999.  top shows … wait for it … 67% CPU utilization, or about one fifth of VLC’s.  (Less, actually, since at that usage VLC was dropping frames.)  Too bad Gnome-mplayer is buggy as heck: buttons like “pause” and “stop” do nothing, and the rest of the user interface is a crapshoot at best.

On a system like this, efficiency makes a big difference.  Now if only we could get efficiency and functionality together…

5 thoughts on “Efficiency

  1. That system has a PowerVR GPU, doesn’t it? PowerVR support has never been good on Linux. I think you’ll get efficiency and functionality closer together using hardware which has better GPU support under Linux. Maybe try MythTV or GeeXBox and see if you get better results.

  2. Ouch, a Poulsbo board? That hurts. PowerVR will never be supported by Linux properly, so you’re stuck using VESA. You’ll never get vsync with one of those.

    You’re also doing YCrCb -> RGB, and scaling totally in software. I imagine VLC is using a better and slower scaling. Did you try mpv by chance?

    But you really have to choose the hardware for the application. Graphics not supported by Linux? Probably a bad idea for a home theater PC.

  3. Yeah, it would definitely be a bad choice for an HTPC, and I might not have bought it if I’d realized it was a Poulsbo … but HTPC isn’t its primary purpose anyway. It’s a wifi router, HTTP server, IRC host, my only optical drive, and oh by the way, it can play DVDs if needed.

    I’m not sure vsync is a lost cause. The kernel appears to have vblank support.

    As for VLC vs. mplayer, a factor of 5 difference in CPU suggests something a lot bigger than just a better upscaling filter. My best guess is that VLC is still trying to use some kind of emulated acceleration (llvmpipe?) that is actually unoptimized.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>