+#ifdef WITH_LIBSWSCALE
+ struct SwsContext* img_convert_ctx =
+ sws_getContext(context->width, context->height, PIX_FMT_RGB24,
+ context->width, context->height, context->pix_fmt,
+ SWS_BICUBIC, NULL, NULL, NULL);
+
+ sws_scale(img_convert_ctx, pict->data, pict->linesize,
+
+ 0, context->height, encodable->data,
+ encodable->linesize);
+
+ sws_freeContext (img_convert_ctx);
+#else