On Sun, Jun 29, 2014 at 5:35 AM, Maksym Veremeyenko <ve...@m1stereo.tv> wrote:
> Hi,
>
> i was tried to reach realtime performance for some simple cg operation and
> found that during composite transition operation MLT create an alpha plane
> for frame that has not it and not even require for further display. i.e. if
> you put a small CG over HD frame, MLT create a full frame alpha channel and
> further blending operation use it memory for no reason IMHO.

I appreciate your effort.

> so i implement function mlt_frame_get_alpha_mask_nc that do the same as
> mlt_frame_get_alpha_mask but do not create alpha channel if not exist - it
> just return NULL. next i replaced some code parts for using
> mlt_frame_get_alpha_mask_nc and handling returned NULL value.

Hmm, I do not like the function name (nc part); we can come up with
something better. Well, for starters, we can make it shorter by
dropping "mask." One thought I have is a new mlt_frame_get_alpha()
with a boolean (int) create parameter and deprecate the old function.
This will make it easy to refactor all uses of
mlt_frame_get_alpha_mask(). Or, deprecate mlt_frame_get_alpha_mask(),
add mlt_frame_get_alpha() without create parameter, and add a
mlt_frame_create_alpha(value).

> finally composite_line_yuv_sse2_simple function was split into 8 variants:
>
> |0| dest_a == NULL | src_a == NULL | weight == 256 | blit
> |1| dest_a == NULL | src_a == NULL | weight != 256 | blend: with given alpha
> |2| dest_a == NULL | src_a != NULL | weight == 256 | blend: only src alpha
> |3| dest_a == NULL | src_a != NULL | weight != 256 | blend: premultiply src
> alpha
> |4| dest_a != NULL | src_a == NULL | weight == 256 | blit: blit and set dst
> alpha to FF
> |5| dest_a != NULL | src_a == NULL | weight != 256 | blend: with given alpha
> |6| dest_a != NULL | src_a != NULL | weight == 256 | blend: full blend
> without src alpha premutiply
> |7| dest_a != NULL | src_a != NULL | weight != 256 | blend: full (origin
> version)
>
> from my tests i did not found visible regression. may be somebody else could
> also review/test proposed code.

I understand this is only for review at this time, but I would really
like some tests around this change. They do not have to quantifiable
and measurable tests (although that would be ideal!). At least some
melt command lines to exercise each case, with support files if needed
for visual verification. I recall there was one or two bug reports and
fixes with interesting corner cases. This is the only one I could find
today:
https://sourceforge.net/p/mlt/bugs/198/

I am going on a holiday for a week, and I will not be able to look at
this myself until middle of July.

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to