x265 and SVT-HEVC in the same house

With changeset a41325fc854f, the x265 library can invoke the SVT-HEVC library for encoding through the —svt option. We have mapped presets and command-line options supported by the x265 application into the equivalent options of SVT-HEVC, and have added a few specific options that are available only when the SVT-HEVC library is invoked. This page in our documentation describes the steps to build, and invoke the SVT-HEVC library in more detail.

Our reason for this integration was to enable our users to evaluate additional relative trade-offs between performance and compression efficiency while working behind the familiar API of the x265 library. In the long term, we plan to leverage this integration to further improve x265’s ability to handle real-time and low turn-around scenarios in pure software; this is the space that SVT-HEVC was focused on. In parallel, we will continue to innovate on our flagship presets that are used in offline encoding where x265 dominates.  You can expect to see these changes in the coming releases of x265, increasing the reach of open-source for video compression!

v3.0 is now out!

We are happy to announce now have version 3.0 of x265. The main focus of this version is to improve the quality, especially for the ‘veryslow’ and ‘slower’ presets. Moreover, Dolbyvision is included in this version. The detail description of all the new features and releases is available in our release notes.

x265 delivers Dolby Vision streams!

 By Aruna MatheswaranKirithika Kalirathnam

Dolby Vision transforms the way you experience movies, TV shows, and games with incredible brightness, contrast, and color that bring entertainment to life before your eyes. By fully leveraging the maximum potential of new cinema projection technology and new TVs’ display capabilities, Dolby Vision delivers high-dynamic-range (HDR) and wide-color-gamut content.

Dolby Vision compliant bitstreams can now be easily generated out of x265 by specifying the preferred Dolby Vision profile in the command line option –dolby-vision-profile we have introduced.

Here is the list of  Dolby Vision profiles that x265 supports today, but Dolby Vision provides a rich set of profiles to support various ecosystems from over-the-top streaming to Blu-ray Discs.  For more information, please refer to the Dolby Vision Profiles and Levels document at https://www.dolby.com/us/en/technologies/dolby-vision/dolby-vision-profiles-levels.pdf.

  • Profile 5 single layer with Dolby Vision-only support  
  • Profile 8.1 single layer with HDR10 compatibility
  • Profile 8.2 single layer with SDR compatibility

All these encodes use the 10-bit YCbCr 4:2:0 base layer output as input, which is generated from a Dolby Vision mezzanine source that has gone through profile specific Dolby Vision pre-processing.

The single layer encoding approach includes a base video essence, while the dual-layer encoding approach contains a base layer and enhancement layer video essence. Multiple video essences can be either carried separately or interleaved as a single video essence within a media container.

Comparison of Dolby Vision profiles supported in x265

* Dolby Vision-proprietary IPT is similar to BT.2100 ICtCp, where I is similar to I, P similar to Cp, and T similar to Ct.

Metadata muxing enabled x265 Encoder

Dolby Vision’s processing pipeline includes 4 major stages starting with source mezzanine pre-processing, encoding,  metadata muxing with elementary bitstream and post-processing.

To minimize the workload of Dolby Vision processing pipeline, x265, in addition to generating Dolby Vision Compliant elementary streams, has also encapsulated Dolby Vision Metadata muxing in its workflow. –dolby-vision-rpu is the command line option we have introduced in x265 to take in Dolby Vision RPU metadata generated by Dolby Vision pre-processors and mux it with the elementary bitstream.

Muxing enabled x265 Encoder



Who gets more bits? Chroma? or Luma?

Due to the larger color volume that IPT delivers, more bits than usual may be allocated for chroma. Since the human visual system is more sensitive to the compression artifacts in luma, increasing chroma QP offset values may improve video quality when more bits are needed for luma. Hence, we have optimized the chroma QP offsets for Dolby Vision profile 5 encodes.

Sample x265 command line to try out:

 ./x265 --input <Profile specific 10bit YCbCr 4:2:0 source> --input-res <wxh> --fps <fps> --input-depth 10 –-input-csp i420 --dolby-vision-profile  <5|8.1|8.2> --dolby-vision-rpu <Dolby Vision metadata RPU file> --vbv-bufsize <vbv bufsize> --vbv-maxrate <vbv maxrate> -o Dolby_Vision_stream.hevc

Snapshots captured from LG OLED55C8PTA TV with Dolby Atmos and 4k cinema HDR with Dolby Vision

Dolby Vision profile 5 HDR vs SDR

Dolby Vision profile 8.1’s HDR10 vs Conventional HDR10

Dolby Vision profile 8.2’s SDR vs Conventional SDR



Meet us at IBC 2018!

Make sure to visit us at our kiosk in the Intel booth at 5.B65, where we will be demonstrating enhancements to x265 that improve the throughput of encoding for ABR streaming by over 2X by leveraging Machine Learning on the CPU. We continue to innovate in this space to bring ground-breaking improvement in performance and quality by leveraging our expertise in video compression algorithms, machine learning technology, and microarchitecture-aware optimizations that enabled us to use Intel AVX512 instructions while encoding.
You can reach out to us on our usual channels developer mailing listdoom9 or Facebook to talk.

Adaptive Multi-Resolution Encoding in x265

By Bhavna Hariharan

x265’s ability to leverage AI to accelerate encoding Adaptive Bitrate Streaming (ABR) has been presented in the paper titled “Adaptive Multi-Resolution Encoding Scheme for ABR Streaming” that is to appear in the proceedings of IEEE International Conference on Image Processing (ICIP), 2018. Adaptive streaming enables dynamic adaptation to changes in network conditions by encoding video content in multiple bitrates and resolutions. Multi-pass x265 encodes exploit the structural redundancy across multiple resolutions by sharing analysis data in the order of increasing resolution, thereby reducing the computational burden significantly.

Static and dynamic refinement features were conceptualized for the Adaptive streaming topology in x265. As the first step, the input video sequence is scaled down to the lowest resolution of the bitrate ladder and is encoded. Coding metadata such as CU quadtree structure, PU predictions, coding modes and motion vectors (MVs) are stored during this first pass encode at CTU level abstraction. The subsequent higher-resolution encodes invoke either the static or the dynamic refinement algorithm. The figure below depicts this architecture for a three pass system. Theoretically, this can be extended to N passes.

The static refinement algorithm may further be classified as intra-picture and inter-picture refinement wherein the information from the previous pass is used at different levels of granularity thereby giving the current encode a head start. The encoder intelligently refines the analysis data based on certain heuristics and later uses it in the Rate Distortion Optimization (RDO) process. By tweaking the degree of information that is being reused, the user can control the performance vs quality balance of the encode.

The dynamic refinement algorithm applies Bayesian classification on the information saved in the previous pass and identifies patterns between the complexity of the content and the refinement level being used. Based on these patterns, the dynamic refinement algorithm switches between the static refinement levels. This will allow the encoder to find the optimal balance between performance and quality while taking the content complexity into account, making it more efficient than the static refinement methods.

Compared to conventional single-resolution approaches, the computational complexity of higher resolution encodes is drastically reduced with the use of the AI-based adaptive multi-resolution technique. The adaptive multi-resolution scheme is able to achieve a whopping speedup of about 2.5X, with a negligible drop in the quality. The above table from the research paper compares the speed vs quality of static and dynamic refinement levels. Since the AI tools used in x265 are not based on CNN models, x265 is able to leverage the advances in CPU technology to achieve these improvements.

x265 turns 5!

As it turns out, the x265 project turned 5 a couple of months back; our first commits from the HM encoder date back to March, 2013. And being the geeks that we are, we didn’t even realize it!

Many thanks to all those who have enabled x265 accomplish all that it has over 5 years! We continue to innovate inside x265 to improve both quailty, and performance and look forward to celebrating our 10th anniversary with you.



Thanks for a great NAB 2018

By Pradeep Ramachandran

Now that the dust has settled, it is time to thank all the contributors for enabling a great showing by x265 at NAB 2018. We showed-off our new ML-accelerated content adaptive encoding for ABR, AVX-512 acceleration, and the recently added support for HDR10+/HLG at NAB. We received great feedback on what people would like to see in the coming releases, and will be working hard to continue to innovate in that space. We’ve also formed a committee to guide the future development of x265, and other open source media codecs that we will blog about more in the coming weeks; read this article for an initial idea of what this is about.

Until our next showing, don’t hesitate to reach out to us on the developer mailing list, doom9 (), or Facebook to talk.

And finally, avx512 in x265!

By Pradeep Ramachandran

Finally, the acceleration that we’ve all been waiting for is here! We’ve been working extensively with Intel for the last few months to use Intel Advanced Vector Extensions 512 (AVX-512) to accelerate x265. After much effort, we’re delighted to share that we’ve been able to accelerate 4K HDR encoding in main10 profile by over 15% for high-quality offline encoding. Checkout this white-paper on the Intel site for more information.

The patches will be pushed to the default branch soon. Let us know the results of your tests – you know where to find us!

Excited about AV1 closing doors, but…

By Pradeep Ramachandran

After what seems to have been a long delay, AV1 finally froze its bitstream last week! Like many folks in the industry, we have been waiting for this moment for a long time to see what a truly ‘royalty-free’ codec can can bring in terms of tools to the encoding space.

A few months ago, we stopped looking further into how AV1’s tools compare to that of HEVC due to this peer-review paper  published in a leading journal from leading researchers in the field of video coding. That paper reported that the HM encoder provide average bitrate savings of 30% relative to AV1 with an encoding speed that was 25X that of the AV1 encoder; the informed would know that x265’s veryslow is very comparable in encoder efficiency to the HM encoder. While optimizations could bridge the gap in speed, bridging the gap in encoder efficiency would be hard unless some fundamental improvements (that are not covered by the HEVC-patents, mind you) are made. Now that the bitstream is frozen, we will be digging to see what new tools have been brought to the table that were not included in this comparison in the hope to answer the question “Is AV1 fundamentally better than HEVC as a standard?”. Stay tuned here to hear more, or share your thoughts on doom9/x265-devel mailing list.

And of course, there is the issue of patent royalties and licensing, but we will leave that up to the lawyers to deliberate and decide; lets talk more tech here!

NAB 2018, of course we will be there!

By Pradeep Ramachandran

MulticoreWare, the developers of x265, will be available to discuss all things media at NAB 2018 in Las Vegas from April 9th – 12th in their booth at SU-14708. Swing by to talk about the soon-to-publish AVX512 acceleration, content adaptive optimizations for ABR encoding with x265, or if you just want a selfie with the creators of the world’s most popular HEVC encoder.

See you in Vegas!

PS: Make sure to mention this blog post if you stop by to stand a chance to win some open-source memorabilia!