Turing codec: an open-source HEVC video coder
Due to the high volume of data associated with video content, especially when dealing with large picture formats, such as in UHDTV (Ultra High Definition TV), fast and highly efficient video compression is essential to enable services like broadcasting or internet video streaming. The Turing codec is an open source software video encoder that allows efficient compression of video content with low computational complexity. The codec was optimised specifically to achieve superior compression performance for UHD content, to facilitate the increasing demand for these high resolution video services. The codec was named after Alan Turing, one of the most influential scientists in the development of the foundations of theoretical computer science.
The Turing codec is compliant with the Main and Main10 profiles of the HEVC standard. HEVC is the state-of-the-art in video compression and allows the usage of advanced and extremely complex video compression tools to achieve remarkable coding performance. The standard was developed by the Joint Collaborative Team on Video Coding (JCT-VC), a collaboration between the ISO/IEC Moving Picture Experts Group (MPEG) and the ITU-T Video Coding Experts Group (VCEG), the two main organisations for video coding standardisation. The standard can achieve more than 50% bitrate reductions compared to its predecessor H.264/Advanced Video Coding (AVC) for the same subjective quality, as reported in the HEVC final verification. HEVC Version 1, which includes profiles for content distribution, was finalised in January 2013. HEVC decoders are already widely available in a variety of devices, from smartphones to set-top boxes and TV sets. It is expected that in the years to come, practical implementations of HEVC encoders, like the Turing codec, become more and more mature, further expanding the adoption of HEVC in video services involving video storage and transmission.
The Turing codec was optimised for fast encoding of UHD video content. The codebase at the core of the codec was designed from scratch to be as lightweight as possible in terms of execution time and memory consumption. To achieve this goal, the codec relies on two essential features:
- An optimised software framework composed of state-of-the-art C++11 constructs and assembly optimisations. This means that the software is optimised specifically for those typical computations associated with video compression algorithms, minimising branch instructions in critical paths and making use of SIMD instructions via assembly code. The codec also makes use of clever memory management, to only buffer information that is needed during the encoding while discarding unnecessary data, hence keeping its memory requirements to a minimum.
- Advanced algorithms that speed-up the encoding process. During the development of the encoder, great effort was put into evaluating the impact of various HEVC tools on compression efficiency and complexity. This resulted in an encoder that has the ability to predict the most promising encoding decisions in terms of compression efficiency without having to perform extensive searches to test all options and tools available in the HEVC standard.
The Turing codec also supports different speed pre-sets, designed to provide flexibility and adaptability to different use cases. The pre-sets control the pre-defined values of many encoder options, allowing specific trade-offs between computational complexity and encoder efficiency. Apart from these pre-sets, users can also easily fine-tune a number of encoder parameters to better customise the codec to individual requirements.
The first version of the Turing codec provides consistently good compression efficiency with very low computational complexity. It can significantly outperform other tested HEVC software encoders, particulary on UHD content. Furthermore, the memory resources consumed by the Turing encoder are found to be only a fraction of what is used by the compared HEVC codecs as illustrated in the following figure. The graph shows the memory consumption for encoding the first 25 frames of a UHD video sequence using: (a) the HEVC reference test Model (HM), (b) the Turing codec and (c) another selected HEVC software encoder. For each frame, the amount of memory consumed is plotted, where the Turing codec is shown to consume the least. This means that encoding with the Turing codec is potentially much cheaper, particularly when working with highly demanding content, such as in UHDTV.
The Turing codec is released open source under the GPLv2 license, and the source code can be freely accessed from a Github repository. The codec is currently at a stage of significant maturity, but is still under active development to implement additional functionalities and further improve the performance. The ambition is for the Turing codec to grow into one of the most widely adopted HEVC implementations and become a reference for a powerful, lightweight and extremely efficient video compression platform.
Further details can be found on the Turing codec website.