Experiments with the Cairo Video Codec

Saturday, June 27th, 2015

Cairo is a simple video codec that I developed in early 2011 during the later stages of everyAir. The purpose of this codec was to experiment with compression features and learn about their individual impact on efficiency while developing a simple framework for future work.

Video codecs contain a lot of features such as subpixel motion estimation, differential coding, quantization, deblocking, rate control, entropy coding, and many more. Each feature must be adaptively configured to perform well despite abrupt changes in the source video. Balancing these features with overall frame quality and size can be a daunting task, and codecs that do it well will outperform those that don't.

It's been over four years since Cairo was completed and I thought it might be interesting to dust it off and visualize the benefits of some of its features. Specifically, I was interested in comparing the effects of its generic motion compensation, sub-pixel motion compensation, differential coding, and quality controlled quantization.


Continue reading...

The Basics of Image Denoise Filtering

Saturday, April 18th, 2015

Denoising is a very useful process that's used in video compression, computer vision, video capture pipelines, and more. Anywhere that noise may find its way into an image, denoising filters are there to help clean things up. There are many different kinds of noise, and fortunately there are equally many ways of correcting it.

Modern video codecs include denoising filters to mitigate some of the artifacts produced by the encoding process. The Cairo codec is no exception, and uses a simple denoise filter during image decoding to smooth out noise that may find its way into a frame.

As mentioned, there are many different kinds of noise, but I'd like to focus this article on one particular type: salt and pepper noise. This kind of noise presents as speckled light and dark pixels that can give a frame a grainy look and degrade the clarity of the image. Sometimes these artifacts are desirable, as they can mimic film grain or other visual qualities, but when they are introduced by the codec, it's best to rectify them.


Continue reading...

The Making of Balls Away

Friday, March 20th, 2015

Balls Away is a fast paced action game for iOS that pits you against a horde of evil balls bent on the destruction of a small rabbit colony. Leveraging the Vision 3 game engine, Balls Away features a rich 3D world with randomly generated levels and intense gameplay.

For more information about this game, visit its project page. For more information about the game engine that powers Balls Away, check out the Vision 3 project page.

Continue reading...

Context Adaptive Binary Arithmetic Coding

Friday, January 2nd, 2015

Context adaptive binary arithmetic coding, often abbreviated as CABAC, is an essential part of modern video compression. It performs lossless compression of a binary data stream without any prior knowledge of the particular characteristics of the data. These features make it an attractive algorithm for video compression because it is simple, effective, relatively fast, and requires no prior (or side band) communication between a client and server.

The most well known codecs that leverage CABAC are H.264/AVC and H.265/HEVC. My own codec, P.264 also leverages a version of CABAC, and I recall during the early days of P.264 development that there were surprisingly few sturdy resources available for learning more about the details of this system.

The goal for this article is to provide a gentle introduction to the process, without delving too deeply into the underlying theory of it. Additional resources for further reading will be linked inline throughout the article. Also, for those unfamiliar with basic compression concepts, check out my previous article on compression fundamentals.

Continue reading...

Fundamentals of Compression

Friday, December 26th, 2014

Compression is the process of reducing the storage space requirement for a set of data by converting it into a more compact form than its original format. This concept of data compression is fairly old, dating at least as far back as the mid 19th century, with the invention of Morse Code.

Morse Code was created to enable operators to transmit textual messages across an electrical telegraph system using a sequence of audible pulses to convey characters of the alphabet. The inventors of the code recognized that some letters of the alphabet are used more frequently than others (e.g. E is much more common than X), and therefore decided to use shorter pulse sequences for more common characters and longer sequences for less common ones. This basic compression scheme provided a dramatic improvement to the system's overall efficiency because it enabled operators to transmit a greater number of messages in a much shorter span of time.

Although modern compression processes are significantly more complicated than Morse Code, they still rely on the same basic set of concepts, which we will review in this article. These concepts are essential to the efficient operation of our modern computerized world — everything from local and cloud storage to data streaming over the Internet relies heavily on compression and would likely be cost ineffective without it.

Continue reading...

Perceptual Hashing

Wednesday, May 28th, 2014

Hash functions are an essential mathematical tool that are used to translate data of arbitrary size into a fixed sized output. There are many different kinds of these functions, each with their own characteristics and purpose.

For example, cryptographic hash functions can be used to map sensitive information into hash values with high dispersion, causing even the slightest changes in the source information to produce wildly different hash results. Because of this, two cryptographic hashes can (usually) only be compared to determine if they came from the exact same source. We cannot however measure the similarity of two cryptographic hashes to ascertain the similarity of the sources.

Continue reading...



previous page    |    1    2    3    4    5    |    next page