On Fri, Jul 15, 2016 at 12:35 AM Jean-Baptiste Mardelle <j...@kdenlive.org>
wrote:

> On Friday, July 15, 2016 4:27:04 AM CEST, Brian Matherly wrote:
> > JB,
> >
> > I think this optimization could be made in frei0r.cairoblend.
> >
> > Could you compare the performance of frei0r.cairoblend with
> > transition_qtblend when the top frame has transparency?
> >
> > Seems like the transition_qtblend would be worth keeping
> > regardless of whether its performance is better.
>
> I did make some further optimisations to my qtblend transition, and
> performance seems quite similar to cairoblend when doing a composite
> operation.
>
> qtblend can easily be modified to also use opacity and affine like
> transformations by applying a QTransform to the QPainter.
>
> I did spend some more time looking at cairoblend, composite and affine
> transitions though, and here are my quick thoughts:
>
> * composite transition: like Dan said, using the Kdenlive's monitor zoom I
> can clearly see the luma  bleed
>
> * affine transition: when used as a filter, it does not correctly handle
> alpha channel (see picture in http://j-b-m.ch/affine-bug.png ). I tried to
> fix it but non trivial to fix for all cases
>
> * frei0r.cairoblend: if we want to optimize it as I did for qtblend, it
> would require modifications to transition_frei0r.c, since this helper
> always requests RGBA images for the A and B frames. Making it retrieve only
> B frame if it has no transparency does not seem easy since as Dan noted
> some frei0r transition might want to use A frame even when B frame is fully
> opaque, so it would require some kind rules depending on which
> transition/parameters.
>
> So in conclusion, despite the fact that I agree it's better to fix the
> problems rather than adding a new solution, in this case - thinking about
> Kdenlive - I think the best option would be to enhance my current
> implementation of qtblend to allow affine like transform and use it as a
> replacement for composite/affine/cairoblend in Kdenlive.
>
>
As I learned more about Qt's painter a few years ago, I have to admit the
same thoughts have occurred to me as well. Do you think qtblend can support
frame threading?

Regarding existing effects, I am hesitant to touch composite much and
consider sub-pixel rendering and interpolation outside of its scope. I
think it still makes sense to add an optimization with the frei0r cairo
mixers themselves depending on blend mode and if benchmarks show no major
degradation: even though B frame must be retrieved, memcopy-ing it where
possible would still be a major optimization.
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to