[FFmpeg-devel] port mplayer eq filter to libavfilter

Michael Niedermayer michaelni
Thu Dec 9 04:04:43 CET 2010


On Wed, Dec 08, 2010 at 07:16:40AM -0500, Ronald S. Bultje wrote:
> Hi,
> 
> On Tue, Dec 7, 2010 at 2:01 PM, Stefano Sabatini
> <stefano.sabatini-lala at poste.it> wrote:
> > On date Tuesday 2010-12-07 10:00:26 +0800, William Yu encoded:
> >> 2010/12/4 Michael Niedermayer <michaelni at gmx.at>:
> >> > On Fri, Dec 03, 2010 at 02:47:58AM +0100, Michael Niedermayer wrote:
> >> > [...]
> >> >>
> >> >> > +
> >> >> > + ? ?__asm__ volatile (
> >> >> > + ? ? ? ?"movd %3, %%mm3 \n\t"
> >> >> > + ? ? ? ?"movd %4, %%mm4 \n\t"
> >> >> > + ? ? ? ?"punpcklwd %%mm3, %%mm3 \n\t"
> >> >> > + ? ? ? ?"punpcklwd %%mm4, %%mm4 \n\t"
> >> >> > + ? ? ? ?"punpckldq %%mm3, %%mm3 \n\t"
> >> >> > + ? ? ? ?"punpckldq %%mm4, %%mm4 \n\t"
> >> >> > + ? ? ? ?"1: \n\t"
> >> >> > + ? ? ? ?"pxor %%mm0, %%mm0 \n\t"
> >> >> > + ? ? ? ?"mov %2, %%"REG_c" \n\t"
> >> >> > + ? ? ? ?"sar $3, %%"REG_c" \n\t"
> >> >> > + ? ? ? ?"2: \n\t"
> >> >> > + ? ? ? ?"movq (%0), %%mm1 \n\t"
> >> >>
> >> >> > + ? ? ? ?"movq %%mm1, %%mm2 \n\t"
> >> >>
> >> >> have you benchmarked changeing this one from mplayer?
> >> >
> >> > note, you can trivially benchmark code by putting START/STOP_TIMER around
> >> > code that you want to benchmark
> >> >
> >>
> >> Thanks for your help. I optimizing it.
> >> Should i revert assembly code to original mplayer code
> >> before i can finding out a better way?
> >
> > Absolutely.
> >
> > Please try to change the code as little as you can, this is a *port*,
> > further optimizations can be done later (that also means less work for
> > you and for the reviewers).
> 
> NO!
> 
> Most of my suggested changes clearly make it faster and better. Anyone
> can confirm that without needing to time it. We don't accept broken
> ports, but likewise we should not expect broken mplayer code. Being in
> mplayer in no way guarantees being perfect.

Theres a very easy solution (noone has mentioned it in this thread yet??!)
a patchset (made by git or other)
1 diff does the port
1+ diffs do the fixes and optimizations.
This is much easier to review than 1 single patch where one has no idea
if a change was a mistake, a bugfix, needed for porting, and no details
either way not to mention changes can be missed in a single mixed patch easier
than several cleanly split patches

[...]
-- 
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/20101209/fcee9323/attachment.pgp>



More information about the ffmpeg-devel mailing list