Sign in with
Sign up | Sign in

Next-Gen Video Encoding: x265 Tackles HEVC/H.265

Next-Gen Video Encoding: x265 Tackles HEVC/H.265
By

Last month, the HEVC/H.265 standard was officially published. We recently got our hands on a pre-alpha build of x265, an HEVC encoder project from a company called MulticoreWare that's going to be licensed in much the same way as the famed x264 library.

So much of what we do at Tom’s Hardware depends on an evolving benchmark suite. Sometimes I put up news stories or Twitter posts asking for what you want to see from our reviews, and we’ve added a ton of testing based on that feedback. But we also keep up with industry trends and adopt testing for taxing new technologies as soon as we can.

Now, you’re already familiar with the H.264 video codec, which is instrumental in compressing high-definition video for distribution. Most of the devices you watch movies on employ fixed-function logic to accelerate decoding of H.264-based content, minimizing the host processor workload and, at least on mobile devices, extending battery life. But high-quality software-based encoding can still be pretty taxing, which is why we have Adobe’s Media Encoder, HandBrake, and TotalCode Studio in our standard benchmark suite.

What’s the point of three different benchmarks that involve H.264? As it turns out, each encoding algorithm is different, and at a given quality level, bit rate can vary quite a bit. The following chart, which comes from a comparison conducted by Lomonosov Moscow State University’s Graphics and Media Lab, demonstrates the x264 encoder’s efficiency compared to other popular options.

x264 benefits from years of development and optimization. It’s freely available under the terms of the GNU GPL for internal use, or you can license it commercially if your company is concerned about linking proprietary applications to GPL code. So, big companies like Netflix, Hulu, Amazon, and YouTube are leveraging it to get more quality from lower-bit rate files, preserving bandwidth and delivering a better experience. Meanwhile, enthusiasts and power users get to use it at home without paying anything, and open source front-ends like HandBrake employ it for H.264-based encoding.

But of course, we’re entering this era of higher-definition displays, higher dynamic range, and larger color space, all of which has to be represented by more data. That means larger video files if you want better quality. You can already see how streaming the nicest-looking content is getting increasingly more bandwidth-intensive. Fortunately, the standard for H.264’s successor, High Efficiency Video Coding, was recently published. It’s more computationally intensive, but should increase coding efficiency dramatically compared to H.264.

Instead of H.264’s 16x16-pixel macroblocks, HEVC employs something called a Coding Tree Unit that can be as large as 64x64, describing less complex areas more efficiently. Even still, 1080p encodes are expected to be five to 10 times more taxing, while 4K video multiplies those demands by another 4 to 16x. Fortunately, a lot of effort went into making sure that encoding can be parallelized, and I’ll illustrate the impact of this shortly.

How, you ask? Today, MulticoreWare (the company responsible for creating an OpenCL-accelerated version of x264 for Telestream’s Episode Encoder) is making pre-alpha code for its HEVC encoder available at Bitbucket. Its commercially-funded project began earlier this year, and it’ll employ the same business model as x264, meaning you can download and compile x265 under the GNU GPL as well. Leveraging source code from x264 (and indeed, with that project’s lead developer as an adviser), MulticoreWare is hoping to see x265 become a true successor.

Ask a Category Expert

Create a new thread in the Reviews comments forum about this subject

Example: Notebook, Android, SSD hard drive

Display all 31 comments.
This thread is closed for comments
  • 3 Hide
    Jindrich Makovicka , July 23, 2013 6:57 AM
    In addition to PSNR comparison, I'd be much more interested in the SSIM metric, which is better suited for codecs using psychovisual optimizations.

    PSNR can be usable for when testing varying parameters for one codec, but not so much when comparing two completely different codecs.
  • 4 Hide
    CaedenV , July 23, 2013 6:57 AM
    Nice intro to the new codec!
    And to think that this is unoptomized... Once this is finalized it will really blow 264 out of the water and open new doors for 4K content streaming, or 1080p streaming with much better detail and contrast. This is especially important with the jump to 4K video. The 16x16 grouping limit on x264 is great for 1080p, but with 4K and 8K coming down the pipe in the industry we need something better. The issue is that we really do not have many more objects on the screen as we did back in the days of 480i video, it is merely that each object is more detailed. Funny thing is that a given object will typically have more homogeneous data across its surface area, and when you jump form 1080p to 4K (or 8K as is being done for movies) then it takes a lot more 16x16 groupings which may all relay the same information if it is describing a large simple object. Moving up to 64x64 alone allows for 8K groupings that take up the same percentage of the screen as 16x16 groupings do in 1080p.
  • -3 Hide
    nibir2011 , July 23, 2013 7:01 AM
    Considering the CPU Load i think it wont be a viable solution for almost any home user within next 2-3 years unless CPUs gets exceptionally fast.

    Of course then we have the Quantum Computer. ;) 
  • 4 Hide
    Shawna593767 , July 23, 2013 7:11 AM
    Quantum computers aren't fast enough for this, the get their speed by doing less calculations.
    For instance a faster per clock x86 computer might have to do say 10 million calculations to find something, whereas the quantum computer is slower per clock but would only need 100,000 calculations.
  • 3 Hide
    Cryio , July 23, 2013 7:26 AM
    I the rate Intel is NOT improving their CPUs, quantum computers are far, far away
  • 0 Hide
    nibir2011 , July 23, 2013 7:35 AM
    Quote:
    Quantum computers aren't fast enough for this, the get their speed by doing less calculations.
    For instance a faster per clock x86 computer might have to do say 10 million calculations to find something, whereas the quantum computer is slower per clock but would only need 100,000 calculations.



    well a practical quantum computer does not exist . lol

    i think that is not the case with calculation.i think what you mean is accuracy. number of calculation wont be different; it will be how many times same calculations need to be done. in theory a quantum computer[whatever qubits] should be able to make perfect calculations as it can get all the possible results by parallelism of bits[long stuff]. a normal cpu cant do that it has to evaluate each results separately. SO a quantum computer is very very efficient than any traditional cpu. Speed is different it depends on both algorithm and architecture. quantum algorithms is at its infancy. last year maybe a quantum algorithm for finding out primes was theorized. I do not know if we will see a quantum computer capable of doing what the regular computers do next 30 years.

    thanks

  • 2 Hide
    InvalidError , July 23, 2013 8:42 AM
    Most of the 10bit HDR files I have seen seem to be smaller than their 8bits encodes for a given quality. I'm guessing this is due to lower quantization error - less bandwidth wasted on fixing color and other cumulative errors and noises over time.
  • 7 Hide
    ddpruitt , July 23, 2013 10:08 AM
    I know it's a minor detail but it's important:

    H.264 and H.265 are NOT encoding standards, they are DECODING standards. The standards don't care how the video is encoded just how it's decoded, I think it should be made clear because the article implies they are decoding standards and people incorrectly assume one implies the other. x264 and x265 are just open source encoders that encode to formats that can be decoded properly by H.264 and H.265.

    x264 has noticeable issues with blacks, they tend to come out grey. I would like to see if x265 resolves the problem. I would also like to see benchmarks on the decoding end (CPU Load, power usage, etc) as I see this becoming an issue in the future with streaming video on mobile devices and laptops.
  • 1 Hide
    chuyayala , July 23, 2013 12:56 PM
    I truly hope this is optimized for Open-CL encoding in the future.
  • 1 Hide
    Nintendo Maniac 64 , July 23, 2013 1:06 PM
    You guys should really include VP9 in here as well, since unlike VP8 it's actually competitive according to the most recent testing done on the Doom9 forums, though apparently the reference encoder's 2-pass mode is uber slow.
  • 3 Hide
    InvalidError , July 23, 2013 1:40 PM
    Quote:
    I know it's a minor detail but it's important:

    H.264 and H.265 are NOT encoding standards, they are DECODING standards.

    h264/h265 are methods of storing compressed video.

    While the exact method of encoding and decoding it are at the individual algorithm developers' sole discretion, the structures and core algorithms related to how information ultimately needs to be structured dictate a fair chunk of how BOTH the encode and decode algorithms need to work.

    Most of the decode steps are almost exact inverse transforms of their corresponding encode steps. That's why you have reference encoders and decoders to prove that every encoding step can be reversed by its corresponding decoding step. Saying that encode is unrelated to decode is very naive; they are very closely related - at least in reference implementations.

    Some programmers may find shortcuts through the reference designs or ways to combine multiple steps into one or find other ways to achieve the same result for a given step or group of steps but the overall encode and decode algorithms usually retain the same general flow.
  • 0 Hide
    ElMoIsEviL , July 23, 2013 3:17 PM
    Quote:
    Quantum computers aren't fast enough for this, the get their speed by doing less calculations.
    For instance a faster per clock x86 computer might have to do say 10 million calculations to find something, whereas the quantum computer is slower per clock but would only need 100,000 calculations.


    Quantum Computers do less calculations by virtue of being able to calculate every possible answer simultaneously (as the amount of Qbits rises the amount of possible solutions entertained in a Quantum State rises exponentially). Seems to me that this would be perfect when it comes to the concept of having to do multiple passes in terms of video encoding. You'd only have to do a single pass and during that single pass any possible outcome in terms of frame IQ can be processed simultaneously ensuring that each frame kept is the perfect frame free of errors.

    It would be quite super.
  • 0 Hide
    nevilence , July 23, 2013 4:03 PM
    Quote:
    Quantum Computers do less calculations by virtue of being able to calculate every possible answer simultaneously./quotemsg]

    That doesnt sound right at all? I may be wrong here but qbits are the same in concept as a normal bit, expcept instead of two states it can have three i.e 0, 1 or 0/1. That doesnt calculate every possible answer, just one of three possible states? So two qbits can give 9 different states as opposed to classical bits which would only give 4. Again I may have my wires crossed here. Just sounds off to me
  • 2 Hide
    jkflipflop98 , July 23, 2013 4:48 PM
    Basic quantum theory is very difficult to grasp, and understanding the operation of a quantum computer is beyond most humans. There are only a handful of people on this planet that can knowingly speak on the subject, and I'll almost guarantee none of them visit this site.
  • 2 Hide
    nevilence , July 23, 2013 5:28 PM
    Quote:
    Basic quantum theory is very difficult to grasp, and understanding the operation of a quantum computer is beyond most humans. There are only a handful of people on this planet that can knowingly speak on the subject, and I'll almost guarantee none of them visit this site.


    Its only difficult if I observe myself trying to grasp it, wait does that make me a wave or a partical
  • 0 Hide
    Achoo22 , July 24, 2013 2:57 AM
    Quote:
    Basic quantum theory is very difficult to grasp, and understanding the operation of a quantum computer is beyond most humans. There are only a handful of people on this planet that can knowingly speak on the subject, and I'll almost guarantee none of them visit this site.


    So? Just as there are plenty of drivers that aren't very knowledgeable about internal combustion engines, there are plenty of expert programmers that have little knowledge of current computer organization at its lowest levels.
  • 0 Hide
    Sagittaire , July 24, 2013 12:02 PM
    Well I know very well x264 and I make actually test H264 vs H265. Your test have problem:
    - If you make psnr test, you must use best possible setting for x264 and use --tune-psnr
    - you use quantizer mode for x264 and x265. Anyway x264 have really most advanced rate control with crf mode.
    - you don't use the best possible x264 version. x264 10 bits produce better result (at least 0.2 dB for same bitrate).

    If you combine all these tweak, I can say that x264 with best setting produce certainely same PSNR result than x265. Moreover H265 is superior to H264, no doubt about that. But I can say, when I read your article, than x265 is not really superior to x264 at this time (for PSNR result at least).
  • 0 Hide
    ElMoIsEviL , July 24, 2013 12:10 PM
    Quote:
    Quote:
    Quantum Computers do less calculations by virtue of being able to calculate every possible answer simultaneously./quotemsg]

    That doesnt sound right at all? I may be wrong here but qbits are the same in concept as a normal bit, expcept instead of two states it can have three i.e 0, 1 or 0/1. That doesnt calculate every possible answer, just one of three possible states? So two qbits can give 9 different states as opposed to classical bits which would only give 4. Again I may have my wires crossed here. Just sounds off to me
    Quote:


    Quote:
    A quantum computer can be in many states simultaneously, which in turn means that it can, in some sense, perform many different calculations at the same time. To be precise, a quantum computer with four qubits could be in 2^4 (ie, 16) different states at a time. As you add qubits, the number of possible states rises exponentially. A 16-bit quantum machine can be in 2^16, or 65,536, states at once, while a 128-qubit device could occupy 3.4 x 10^38 different configurations, a colossal number which, if written out in longhand, would have 39 digits. Having been put into a delicate quantum state, a quantum computer can thus examine billions of possible answers simultaneously. (One way of thinking about this is that the machine has co-operated with versions of itself in parallel universes.)


    Hope that answers your query.
  • 0 Hide
    nevilence , July 24, 2013 3:18 PM
    The figures you are talking about are just the number of classical bits represented by qbits. Yes 16 qbits may represent what 65k+ classical bits can, but that doesnt mean it examines all answers simultaneously. The act of measuring the spin up or down of the qbit, gives a very clearly defined state, only before observation are there the possiblity of "ulimited" states.

    Well that is at least my understanding, mind you I aint no quantum master either. The youtube link is my source, its a very good watch.

    http://www.youtube.com/watch?v=g_IaVepNDT4
  • 0 Hide
    Filiprino , July 24, 2013 4:23 PM
    x265 is still unoptimized. If the performance improves and with the same bitrate as x264 you can get rid of banding on obscure scenes enabling higher contrast, it's a welcomed codec. I still do not have a CPU that can do x264 1080p real time and you come with this codec eating as much as 10x more cycles. I hope performance improves a lot :( 
Display more comments