Giter Site home page Giter Site logo

cairo-1's Introduction

Cairo Experimental Video Codec

Cairo is a simple streaming video codec that was created in 2011 as part of the (now discontinued) everyAir mobile cloud gaming project. Its original purpose was to help us experiment with low latency game streaming on early mobile hardware (original iPad, iPhone 3GS). Using a heavily tuned implementation, Cairo enabled everyAir to stream PC, Mac, and even PS3 games to iOS devices with extremely low encode and decode latencies.

Demo: PS3 streaming
Demo: latency test
Demo: everyAir

Features

  • Support for intra (i-frame) and inter (p-frame) frame prediction modes
  • Motion compensation with half and quarter pixel precision
  • Supports a virtually unlimited number of reference frames
  • Variance adaptive quantization (both uniform and non-uniform)
  • Intelligent skip block detection that minimizes visual artifacts
  • Periodic intra frame insertion (useful for keyframing)
  • Internal support for planar YUV 4:2:0 images
  • Support for multiple lossless backend compressors involving:
    • Adaptive binary arithmetic coding
    • Exponential Golomb coding
    • Huffman coding
    • Run-length encoding
  • Delta coded macroblocks and motion vectors
  • In-loop deblocking filter
  • 100% integer math
  • Cross platform, fully portable code
  • Simple and easy to read, designed for educational purposes

Open Source Release

This release contains an early and unoptimized version of Cairo that demonstrates the basic functionality of the codec. Cairo's new purpose is to serve as an educational resource for students who are interested in video compression. This release presents a simple and easy to read implementation that demonstrates several common techniques without the complexities of optimizations or platform dependencies.

Running Cairo

evx1.h describes the primary interface for Cairo. Follow these steps to create and activate the encoder:

  • Create a bit_stream object and initialize it to some large size.
  • [optional] Set your desired quality level by calling set_quality with a value between 1 and 31 (inclusive).
  • Create an evx1_encoder object and call its encode method to encode a 24 bit interleaved RGB frame.

Follow these steps to create and activate the decoder:

  • Create a bit_stream object and initialize it to some large size.
  • Create an evx1_decoder object and call its decode method to decode a bit_stream and recover an RGB image.

Caution: patent hazard

Note that while this release is provided under an open and permissive copyright license, the algorithms it contains are likely to be covered by existing patents that may restrict your ability to use this codec commercially.

More Information

For more information visit http://www.bertolami.com.

cairo-1's People

Contributors

ramenhut avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.