On Sat, Jul 16, 2016 at 11:37 AM Jean-Baptiste Mardelle <j...@kdenlive.org>
wrote:
> On Saturday, July 16, 2016 7:02:25 PM CEST, Brian Matherly wrote:
> > Are you sure that line order is the same between Qt and MLT
> > image formats? For some reason I was thinking that line 0 is the
>
The image line order is the same, but the origin for QPainter is top, left,
which might be throwing you off here.
> > bottom for MLT and the top for Qt. If that is the case, the new
> > method can not be used for services that need to draw on the
> > image because, for example, text would be written upside down.
> > It may not matter for some services like your transition that
> > don't have any directional component. Maybe the difference could
> > be compensated by applying a transform to the painter. Could you
> > check this out and report back?
>
> I can confirm that you can draw text directly on the QImage
> (Format_RGBA8888) through a QPainter and it displays correctly in MLT.
>
> > The documentation it a little confusing. It states: "The order
> > of the colors is the same on any architecture if read as bytes
> > 0xRR,0xGG,0xBB,0xAA.". I think what they are trying to say is
> > that the color order will be the same on any architecture if you
> > look at the bytes,
This matches exactly how I have described our mlt_image formats in the
past. This is the only way to write endian Independent code to process
components of packed images. Otherwise, if you use masking and shifting,
you have to do it differently based on endian.
> > but if you look at each pixel as an int, the
> > order will appear differently depending on the endianess of the
> > system. So I think this will work for us on big or little endian
> > systems since. If we find that it does not work on big-endian
> > systems, we can just put a check in place and either convert the
> > easy way or the hard (current) way.
>
>
Also, in avformat module, we use AV_PIX_FMT_RGBA and not AV_PIX_FMT_RGB32:
http://ffmpeg.org/doxygen/trunk/pixfmt_8h.html#a9a8e335cf3be472042bc9f0cf80cd4c5
See also the frei0r color model where mlt_image_rgb24a maps directly
to F0R_COLOR_MODEL_RGBA8888
and we have to do byte swapping for F0R_COLOR_MODEL_BGRA8888:
https://frei0r.dyne.org/codedoc/html/group___c_o_l_o_r___m_o_d_e_l.html#ga68d6ca25df33b7759dfb2c2f6b44a229
------------------------------------------------------------------------------
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