[Ffmpeg-devel] Including a new codec problem

Eduardo Morras nec556
Sun Apr 29 10:39:24 CEST 2007

It looks like that i didn't Cc to maillist, so i send it again. Sorry if it crash someone mail thread system.

At 18:46 24/04/2007, you wrote:
>I'm intrigued, do you have any information on this GOG codec that you  
>can share? Maybe put something on http://wiki.multimedia.cx/ about it.

Hello, here you have a brief and dirty desciption of gog codec. We used internally at my job for store video in high definition losslessly (RGBA32 and YUV444). It's not designed for play, only for storage and is symmetric on speed (compression fps=decompression fps). Original code is freepascal with powerpc/altivec code and reads sequences of BMPs from a optomagnetometer and hd cameras. Now we have a better lab device and don't need the codec, so i'm opensourcing it in my free time (with permission from boss, that's it, myself).

It uses motion estimation based on LZP/dLZP (calculate a hash from up, left and up-left pixels and consult a hash table with the last nxn pixels), no need motion vectors and if nxn is a fixed value (default 2) the size neither. Each plane has it's own hash table. For now only fixed nxn is implemented. It gives an estimation better than common prediction (left, median, average etc) but worse than mpegx/h26x motion estimation/compensation. As always, it depends on the data to evaluate.

Then do a lossless wavelet on each plane (S, S+P, 2+2 / 2, 5 / 3 or 9 / 7) the best one is 2+2 / 2 for our data. It's applied to the whole plane (with some tricks), not line by line as usual (no 1D+1D each row/column, just 1D for all image horizontally merged). No quantization or anyother lossy calculation.

Then transform the wavelet out using MZC and BWT. Trim the last 0's and finally use rangecoder for compress.

Some numbers: On a PowerMacG5 1'8Ghz single core we get 0'8 fps compressing/decompressing with 1920x1280x32 RGBA sources.
A 250 frames video (from our dataset) at 1920x1280x32 compress to ~60 MB our data set. FFV1 gets ~68 MB. Never tried on movies but expect similar or even better.

For future 
- lossy mode for movie type data.
- ME from H26x.
- Other space colors (YUV12, etc...)
- VfW codec, but have very little knowledge about c and windows.

When all current codec is ported to ffmpeg i'll add an entry to http://wiki.multimedia.cx/ and codec-devel maillist.



This document represent my ideas. They are original from me. It's forbidden think the same than me without previous payment.
If you agree me, PAYME.                                                                                                          LOOKOUT: Lawyer BITES.  

More information about the ffmpeg-devel mailing list