Plex Media Center

  • Downloads
  • Mobile
    • iOS
    • Android
  • Support
    • Forums
    • Wiki
  • Dev Center
  • Contact Us
  • News
    • Blog
    • Press Releases
  • Labs

Experimenting with Bicubic scaling

April 04th, 2008 | Category: Coding | Author: lamnina

So for lack of anything better to do, I played around with getting swscale (a component of ffmpeg) to attempt performing high quality software upscaling. By default we perform bilinear upscaling, and with SD content, it looks pretty crappy, with lots of jagged lines.

After getting it to work, I took a couple of screenshots to show you the difference. In terms of performance, my desktop had enough power to do bicubic upscaling of both SD and 720p content to 1080p. It has to be said that it is definitely an expensive operation.

The win was most obvious — to my eyes, at least — with SD content. Here’s a sample from the intro of a movie. The first is bilinear (notice the jagged circle), and the second is bicubic.

bilinear.png

bicubic.png

Pretty nice, right? Now let’s try 720p, with some good diagonal lines taken from Kevin Spacey’s jawline:

bilinear2.png
bicubic2.png
Again, the first is bilinear, the second is bicubic. The screenshot is unfortunately not taken from the same exact frame, and I think that’s why his face looks more “textured” in the second shot. But you’ll also notice that there doesn’t appear be a great deal of difference between the two. It’s possible that I didn’t pick a very good spot, but it’s also possible that the difference between the two algorithms doesn’t really kick in until you’re doing more than a 2x scaling. This kind of makes sense to me, but it’s late and I’ve been drinking.
8 comments

8 Comments so far

  1. tajson April 4th, 2008 1:56 am

    I think you have a fault proof concept there when you always as a last exit blame the alcohol for whatever could be wrong with your ideas.

    If it works as an excuse when you do something illegal, it will work everywhere… Atleast where I live :)

  2. nefilim April 4th, 2008 5:11 am

    Pretty cool! Any chance of doing this in hardware with OpenGL?

    On a vaguely related note, I recently did a quick comparison between the H264 output of VLC,MPlayer and threw in XBMC-OSX at the end:

    http://nefilim.wordpress.com/2008/03/15/h264-quality-differences-in-players/

  3. Dudeman April 4th, 2008 9:06 am

    This is getting better and better…

    The alure of XBMC, for me at least, had always been its ability to scale a relatively low resolution (SD) image to HD, and make it look good. Yes, the interface is really slick, yes, there’s nothing like it out there, but ultimately it’s all about the quality of the image.

    I don’t know how many times I would have people over watching a movie, then they would comment on how clear the video was, and I would, just for kicks, cycle through the resolutions ’till I got to the original size, and their jaw would drop when they would see how small the original image was and how good it looked enlarged.

    Getting bicubic scaling going, and whatever other tricks the old XBOX/XBMC was capable of that made the scaling look so good, is ultimately what we’re all looking forward to.

    Yes, HD content looks great already, but not everything I have (or most of us have), is HD content, so the abiltiy to make SD content look realy good is a major plus. I don’t want to have an Xbox to play SD content AND a Mac to play HD content. One box should do it all.

    At the moment I’m still using my old Xbox connected to the HDTV, and XBMX Mac on my 24″ iMac, but I can see that soon I’ll be retiring the old box in favor of a shiny new Mac-Mini.

    Keep up the great work, and thanks again for your efforts.

  4. elan April 4th, 2008 9:07 am

    @tajson: You’re right, I need to take responsibility for my thoughts! Just because I’m usually drinking at the time doesn’t mean that it’s the booze talking. Of course, I’m enjoying a Bloody Mary at the moment, so you know what that means.

    @nefilim: It’s possible, there is a bicubic upscaling implementation in there, but it doesn’t seem to work on my desktop NVidia card, and it’s unknown whether it will work on GMA950/X3100. Thanks for the link!

  5. Martin April 4th, 2008 10:11 am

    @elan

    As you know (from MSN) :)

    - I would really like better SD movie quality!

    Maybe there could be an option to turn it off/on in an upcoming release?

    Good work, as always
    /Martin

  6. elan April 4th, 2008 10:20 am

    @Martin: Yes, look for it in the next release, with both Bicubic and Lanczos up-scaling optionally available.

  7. Ajgoyt April 4th, 2008 5:28 pm

    Wow getting better all the time – Source has a lot do with upscaling – Thanks Again for your hardwork…

    Aj

  8. elupus April 10th, 2008 2:39 am

    bicubic scaling has a tendency to blur image, so that could be why you get less detail on his jawline.

    bicubic 2(4,8..)x + sharpen + downscale to screen could look very nice.

Leave a reply

Support Plex

Mmmmm...Beer!

Archives

  • December 2011
  • November 2011
  • October 2011
  • July 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008

Categories

  • Coding
  • Developers
  • Holy Cow
  • Metadata
  • myPlex
  • Performance
  • Plug-ins
  • Release
  • Status
  • Survey
  • Tips
  • Uncategorized
  • Wow

Meta

  • RSS
  • Log in
  • Valid XHTML
  • XFN
  • WordPress
PLEX
Download
Wiki
Forums
Blog
Credits