[Ffmpeg-devel] privatizing FifoBuffer into libavutil -- take II
Thu Sep 21 03:22:19 CEST 2006
On Wed, 2006-09-20 at 13:51 +0100, M?ns Rullg?rd wrote:
> > Sure. But I have a question for existing code -- when I move something
> > from one place to the other do I have to also clean up the code in the
> > same patch (the way you suggested) or do these have to be separate
> > patches ? The approach I took was to minimize any changes in this
> > patch to make it easier to review, but I'd be happy to polish
> > infrastructure changes as well.
> I agree with Roman here. File renames and code cleanup should be done
Well, this time around it kind of doesn't matter, but in general it'll
be nice to have a coherent policy.
> > To me, personally, the first one seems easier to grok. But what do the
> > rest of ffmpeg'ers think ?
> I think the second form is easier to read.
So be it ;-)
> > Amazingly enough IT IS! In fact almost 2x times faster. Michael, how
> > did you know ? Your version even contains the dreaded 'if' but it is
> > still faster. 'idiv' is pretty inexpensive on Xeon so the only possible
> > explanation I could come up with would be -- your code reduces register
> > pressure as well.
> If branches are expensive a conditional move should do the trick there.
More information about the ffmpeg-devel