Slashdot Mirror


Theora Ahead of H.264 In Objective PSNR Quality

bigmammoth writes "Xiph hackers have been hard at work improving the Theora codec over the past year, with the latest versions gaining on and passing h.264 in objective PSNR quality measurements. From the update: 'Amusingly, it also shows test versions of Thusnelda pulling ahead of h.264 in terms of objective quality as bitrate increases. It's important to note that PSNR is an objective measure that does not exactly represent perceived quality, and PSNR measurements have always been especially kind to Theora. This is also data from a single clip. That said, it's clear that the gap in the fundamental infrastructure has closed substantially before the task of detailed subjective tuning has begun in earnest.' Momentum is building with a major Open Video Conference in June, the impending launch of Firefox 3.5 and excitement about wider adoption in a top-4 web site. It's looking like free video codecs may pose a serious threat to the h.264 bait-and-switch plan to start charging millions for internet streaming of h.264 in 2010."

9 of 313 comments (clear)

  1. What? by sexconker · · Score: 4, Informative

    H.264 is a specification, not a codec.

    There are various codec implementations of it.
    x.264 being the most popular.
    Main Concept being the best overall.
    Nero being one of the first to market and as usual being slow and bloated and buggy.
    DivX as usual being late to market but driving the push for playback in embedded devices, while being at the top in terms of quality and decoding speed.

    1. Re:What? by uhmmmm · · Score: 4, Informative

      Main Concept being the best overall.

      Oh? this (and this follow up post) seem to indicate that it's not so clearcut. Looks like x264 beat MainConcept in most tests, and the major tests it lost in were rather unrealistic.

      But in the interest of full disclosure, Dark Shikari is one of the main developers on x264, so he's got an obvious bias. Doesn't necessarily make him wrong though.

  2. Re:bullcrap by whoever57 · · Score: 5, Informative

    how exactly do you switch out a software agreement?

    What software agreement? I think that they are licensing patents. They have merely said that you don't have to pay to use the patents before 2010, but if you use the patents after that, you may need to pay (depending on volume). Yes, products that have shipped will be safe, but most companies want to continue shipping products, which will be affected by the royalty demands.

    --
    The real "Libtards" are the Libertarians!
  3. Re:bullcrap by Anonymous Coward · · Score: 3, Informative

    "...even if there was a clause in there stating "we can change this at anytime"..."

    That's *exactly* what's in the MPEG licenses. And software vendors don't get indefinite licenses for distributing MPEG implementations, they have to reup on a regular basis.

  4. Correct! by xiphmont · · Score: 3, Informative

    And following Thusnelda will be Snuppflog. They're just internal project names.

    Intel chooses boring internal codenames like towns, we choose silly things that our incredulous detractors dare us to use. But only if we like them.

  5. No, confuzzled hacker by xiphmont · · Score: 4, Informative

    You have to measure the PSNR of each codec with the same tool, silly (and avoid doing colorspace conversions which are lossy in the interchange. Keep the output in YCb'Cr' format). If you're using the x264 encoder's reported PSNR *cough*ahem* it's known to be wrong. It always reports way higher than other tools, like it's forgetting chroma is subsampled or its log-space algebra is just wrong or something.

    Let me check myself with the clip linked in the article....mmmm lessee.... yep! that's what you're doing. So, BZZZT, no gold star, try again.

    1. Re:No, confuzzled hacker by xiphmont · · Score: 3, Informative

      Well, one tester (and Greg's graph was generated to rebut his graph) was converting each output frame to PNG and then feeding them into one of a number of PSNR tools one by one to get a PSNR result. The conversion from YCb'Cr' to RGB is lossy, but apparently this particular author didn't know that.

      He was also using multiple PSNR tools because some were mysteriously not working with some video inputs. Given that there's no one standardized way to calculate PSNR, that led to additional data lulz.

      And for x264, he apparently didn't generate his own numbers, he just used someone else's published numbers.

      Anyhow, He reported that x264 was 30-ishdB (!) better than Theora. Wha? If every Theora frame was black, that still wouldn't account for that much difference. YUV12 is only 40-45dB deep!

      In other words, the whole point of the graph was originally to illustrate and rebut these errors, and it turned out to be a nice regression test too.

      Also, for the record, the x264 curve is not perfectly smooth, but that it's as smooth as it is attests to the fact that it's a nicely tuned codec. That Theora is lumpier is one indication it still has more tuning to be done.

      Also, Greg's response below is way more levelheaded than mine. He actually collected the data himself (so has more detailed, accurate and first-hand knowledge) and he also probably hasn't been drinking whiskey all night.

  6. Re:Why the idiotic naming again? by xiphmont · · Score: 5, Informative

    "Ogg" is actually a term from an early internet game.

    http://en.wikipedia.org/wiki/Ogging

    Theora is named after Theora Jones, a secondary heroine character from the movie 'Max Headroom: 20 Minutes into the Future' about a dystopian future where video media is overwhelming, centralized, oppressive, dangerous, and an off switch on a television is illegal:

    http://en.wikipedia.org/wiki/Theora_Jones#Theora_Jones

    "Xiph" is actually from the Greek ξÎÏÎÏ (sword) by way of 'Xiphophorus' (sword-bearing, pseudolatin?) from the genus name of a fish (Xiphophorus helleri). Which is where I picked it up in middle school. I'd been using it for my software projects since I was 14 or so and by the time Xiph.Org was a real thing [many many years later] I wanted to change the name to something less silly and my co-founders voted me down. They liked Xiph. It became the precedent-setting silly name.

    Vorbis is from Terry Pratchett's _Small Gods_ and I dearly hope Mr. Pratchett considers it a compliment. It was meant as tribute to my favorite fictional villain, Archdeacon Vorbis. "A mind like a steel marble"

  7. PSNR metrics were calculated wrong - x264 Theora by benwaggoner · · Score: 4, Informative

    Turns out there was an error in the methadology used in the original comparison, which hit x264 for more than 4 dB of difference.

    http://www.reddit.com/r/programming/comments/8iphn/theora_encoder_improvments_comparable_to_h264/c09eyvc

    Edit: HAHAHA! We figured out what was wrong--thanks a ton, gmaxwell, for coming on IRC and resolving this! Turns out his testing methodology was flawed... but not in the way I thought!
    Turns he out he did everything correctly... but he used ffmpeg for outputting the raw y4m file to have its quality measured by dump_psnr (but not for theora). Apparently, ffmpeg flags the output chroma as "420mpeg2" instead of "420", which results in over 4db of PSNR being slashed off of x264's results unfairly.
    Oops. We already have a patch submitted to ffmpeg for the problem and a retraction of the Theora comparison results is in the works. Thanks to gmaxwell for taking the initiative and David Conrad (Yuvi) for finding the bug!

    The Doom9 thread on the same topic:
    http://forum.doom9.org/showthread.php?t=146893

    Anyway, given H.264 is a more recent codec that is highly optimized for PSNR and has had many years of refinement in a number of implementations, it's hard to conceive of how Theora could even approach it in compression efficiency, let alone beat it.