[FFmpeg-devel] [PATCH] FFV1 2pass

Michael Niedermayer michaelni
Sun Oct 24 14:07:20 CEST 2010

On Sun, Oct 24, 2010 at 12:47:47PM +0200, Michael Niedermayer wrote:
> On Sun, Oct 24, 2010 at 12:16:50AM -0700, Jason Garrett-Glaser wrote:
> > On Sat, Oct 23, 2010 at 11:24 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > > Hi
> > >
> > > 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.
> > >
> > > Ill apply this patchset soon as it seems quite trivial.
> > 
> > Couldn't this be done per gop in some fashion?  Does it make sense to
> > do it globally for the whole file?
> i dont know, the gains from this patch are small (biggest ive seen is 0.15%)
> and in ver 1.2 that table is not stored by gop anymore, we can of course
> undo that and store by gop again but there are 2 issues with that
> 1. the table needs space too so this would negatively impact 1pass (and 2pass
>    does not seem really worth it for end users with this patch yet)
> 2. i wanted to add tables storing initial states in extradata and if we do and
>    if this does lead to some gains we have the problem that changing the state
>    transition table per gop will change the inital state tables.
> that said i agree its worth a try to see how much can be gained by per gop
> sorting

With foreman gop=1frame
svn         20631228
global      20602744
per gop     20598968

IMHO the gain isnt worth it especially considering that the tables should
need more space than what is gained


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Incandescent light bulbs waste a lot of energy as heat so the EU forbids them.
Their replacement, compact fluorescent lamps, much more expensive, dont fit in
many old lamps, flicker, contain toxic mercury, produce a fraction of the light
that is claimed and in a unnatural spectrum rendering colors different than
in natural light. Ah and we now need to turn the heaters up more in winter to
compensate the lower wasted heat. Who wins? Not the environment, thats for sure
-------------- 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/2058d586/attachment.pgp>

More information about the ffmpeg-devel mailing list