Le 18/12/2014 05:11, Dan Dennedy a écrit :
On Wed, Dec 17, 2014 at 6:26 PM, Christophe Thommeret <hf...@free.fr <mailto:hf...@free.fr>> wrote:

    Hi all,

    I use Shotcut to edit some things (MachinTruc doesn't support
    interlace yet)
    and i notice that there is no gpu based rotation filter.
    The soft one is damn slow and too much aliased to my taste.

    I have one in MachinTruc that could be ported to MLT.
    It's implemented in a 'Size Position Rotation" filter for efficiency,
    so i guess it should go in MLT's movit.rect.

    Question: should the fragment shader be harcoded in movit.rect or
    is there
    any way for MLT to install a shader file system wide ?


Every MLT module has a directory in /usr/share/mlt/opengl that you can put it into. See the module's Makefile to see how it installs the .yml files. You can put it into the same directory. Then, to load it use do something like:

string(mlt_environment("MLT_DATA")) + string("/opengl/rotate.frag")


opengl module' Makefile already creates MLT_DATA/opengl/movit
Could it go here or is it for other purpose?

I wonder how to make a multi Effect Filter, I mean a Mlt::Filter that would combine several Movit::Effect ? In the case of rotation, we need first to apply a PaddingEffect to center the input image on a square texture of size sqrt(input_width² + input_height²) + 1 (adding 1 makes sure we have transparency all around the image since we don't want the edges to be copied on empty parts of the output, and also
gives us antialiasing with bilinear interpolation.)
Then we have to apply a RotationEffect.
And finally the result must be cropped (auto padding should take care of this i guess?).

Additionnaly, resampling (if any) must be done prior to rotation in case of non square pixels
(and the RotationEffect shader needs to know this SAR)

--
Christophe Thommeret

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to