[FFmpeg-devel] [PATCH] FFV1 2pass

Michael Niedermayer michaelni
Sun Oct 24 12:55:17 CEST 2010

On Sun, Oct 24, 2010 at 09:52:37AM +0000, Loren Merritt wrote:
> On Sat, 23 Oct 2010, Michael Niedermayer wrote:
>> The patches below add a 2pass mode to ffv1 that optimally sorts the range
>> coder states. The compression gain is for my test quite small but more things
>> can be added in the future to be finetuned in 2 passes ...
>> Also ive not been able to meassure speedloss here for the added code.
> Why is the default ever nonmonotonic? I could understand optimizing the  
> transition table in ways that don't preserve isomorphism (e.g. adjust  
> learning rate), but not just a reorder.

which ordering is monotonic depends on the data that is compressed.
Besides monotonic does not neccessarily mean optimal, a state could be so
rarely used that placing it at a non monotonic position can benefit the other
states if they are that way closer to their optimal positions.
also my patch had a small bug that it assumed that sorting can be done by
comparing i,i+1 pairs thats not enough to gurantee global optimality, ive
improved that in my tree.

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101024/e4ac32d5/attachment.pgp>

More information about the ffmpeg-devel mailing list