codec optimization

Albert Cahalan acahalan at gmail.com
Sun Feb 25 19:54:13 EST 2007


On 2/25/07, John (J5) Palmieri <johnp at redhat.com> wrote:
> On Sun, 2007-02-25 at 14:20 -0500, Albert Cahalan wrote:

> > Ogg (audio) is a surviver. That Theora thing was stillborn,
> > which is good because you can't decently share a file
> > extension between different media types.
>
> Ogg is just the container format.

That was the plan. Plans don't always work out.
Today, ogg is an audio format.

> Can you elaborate on why Theora is
> "stillborn"?  The code is known not to be optimized so if it is running
> slow on the XO it may just take someone looking into it.

The speed/compression/quality tradeoff isn't good.
Compared to the common formats, all encumbered,
Theora is solidly a loser.

Even if Theora were a bit better than the common
formats, that still wouldn't be good enough to overcome
the opposition of entrenched proprietary standards.
Ogg is quite better than mp3, yet this is not enough
to overcome the mp3 lead.

Basically we missed our chance. Theora arrived way
too late, and it'd actually be a speed/compression/quality
downgrade. That just won't fly.

> > The fast low-compression choice is MJPEG. Perhaps
> > the XO can even create this in real-time.
>
> Are there any legality issues with using mjpeg?

Nope. Unless you fancy animated GIF or want to design
a whole new low-CPU codec, MJPEG is likely to be the
best way to do real-time compression on limited hardware.
Maybe the camera can even do the JPEG part...?

(BTW, I can imagine a fine low-CPU codec. You can use
100% P-frames w/o motion vectors if the decompressor
is carefully specified regarding rounding. Start the stream
with an implied solid-color frame, probably grey. Cuts and
joins can be done anywhere at the cost of one or two
recompressed frames.)

> > For heavy compression, we have Snow and Dirac.
> > Both of these use wavelet compression and thus,
> > if we hurry, have a tiny chance to become the next
> > common real-world standard. (we're up against both
> > the ISO's "reasonable licensing" gang and Microsoft)
>
> It is my impression that Dirac was a high quality archival format which
> is not suitable for real time streaming playback.  I have no knowledge
> of Snow.

It always depends on the resolution and data rate.
Don't try high data rate 1080p/60FPS on the OLPC XO.

Dirac and Snow are how you cram lots of video
onto a device that doesn't have much storage space.

If need be, a high-resolution video in Dirac or Snow format
could be converted to MJPEG prior to playback. This would
be a mild irritation that might be worthwhile for a movie.

Optimization effort is best spent on Dirac and Snow, both
of which stand a chance to be the next big format.



More information about the Devel mailing list