Hello,

I couldn’t find a solution yet,  but maybe someone else has an idea about
this problem:

Scaling via sws_scale() works fine, if I extend width and height, or if I
compress width. However if I compress the height, scaling is done, but
bottom lines are black. 

Example scaling from 800x600 -> 800x400: the lowest third of the frame is
black.

Thanks for any suggestion. 

Max

 

// scale frame code excerpt

static struct SwsContext* img_convert_ctx;

avpicture_alloc ((AVPicture*)outFrame, outPixFmt, outWidth, outHeight);

img_convert_ctx = sws_getContext (CodecCtx->width, CodecCtx->height,
CodecCtx->pix_fmt, outWidth, outHeight, outPixFmt, sws_flags, NULL, NULL,
NULL);

sws_scale(img_convert_ctx, inFrame->data, inFrame->linesize, 0, outHeight,
outFrame->data, outFrame->linesize);

_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to