]> git.sesse.net Git - mlt/blobdiff - src/modules/core/transition_composite.c
Mutable watermark producer and small optimisation
[mlt] / src / modules / core / transition_composite.c
index 466c7742a390605c1c5a3cdc27dd70b6811d9b90..622ae8fe85546443763735e77f38a015be600b07 100644 (file)
@@ -896,6 +896,16 @@ static struct geometry_s *composite_calculate( struct geometry_s *result, mlt_tr
        return start;
 }
 
+static inline void inline_memcpy( uint8_t *dest, uint8_t *src, int length )
+{
+       uint8_t *end = src + length;
+       while ( src < end )
+       {
+               *dest ++ = *src ++;
+               *dest ++ = *src ++;
+       }
+}
+
 mlt_frame composite_copy_region( mlt_transition this, mlt_frame a_frame, mlt_position frame_position )
 {
        // Create a frame to return
@@ -963,7 +973,7 @@ mlt_frame composite_copy_region( mlt_transition this, mlt_frame a_frame, mlt_pos
 
        while ( q < r )
        {
-               memcpy( q, p, w * 2 );
+               inline_memcpy( q, p, w * 2 );
                q += w * 2;
                p += width * 2;
        }