Hi, Following my tests with the qtblend transitions, I realized that the QImage format Format_RGBA8888 allows for a much simpler conversion between MLT and QImage, avoiding the need to copy data. We can in fact simply create a QImage directly from MLT's image buffer (with format=mlt_image_rgb24a):
QImage img( *image, *width, *height, QImage::Format_RGBA8888 ); We can then use a QPainter to draw directly on the buffer. So for instance, in filter_audiowaveform we currently do (line 214): QImage qimg( *width, *height, QImage::Format_ARGB32 ); copy_mlt_to_qimage_rgba( *image, &qimg ); draw_waveforms( filter, frame, &qimg, audio, channels, samples ); copy_qimage_to_mlt_rgba( &qimg, *image ); This can be replaced by: QImage qimg( *image, *width, *height, QImage::Format_RGBA8888 ); draw_waveforms( filter, frame, &qimg, audio, channels, samples ); In my tests, this results in a 8% speedup when rendering a simple video with the audiowaveform filter. My only concern is that in the doc ( http://doc.qt.io/qt-5/qimage.html#Format-enum ) it says that QImage::Format_RGBA8888 behaves differently on big endian systems, and I am not sure if this would affect us... Can anyone with a better understanding or a big endian system tell me if this works on such systems ? Seems like something we might want to use in our Qt producers/filters, what do you think? regards, jb ------------------------------------------------------------------------------ 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