- if ( pix_fmt == PIX_FMT_RGB32 )
- {
- *format = mlt_image_rgb24a;
- struct SwsContext *context = sws_getContext( width, height, pix_fmt,
- width, height, PIX_FMT_RGBA, flags, NULL, NULL, NULL);
- AVPicture output;
- avpicture_fill( &output, buffer, PIX_FMT_RGBA, width, height );
- set_luma_transfer( context, colorspace, full_range );
- sws_scale( context, (const uint8_t* const*) frame->data, frame->linesize, 0, height,
- output.data, output.linesize);
- sws_freeContext( context );
- }
- else if ( *format == mlt_image_yuv420p )