[Libav-user] Problem with swscale, bottom lines are black if height is reduced.
Max Göttner - d.stream
max.goettner at dstream.de
Thu Dec 22 15:23:32 CET 2011
I couldnt find a solution yet, but maybe someone else has an idea about
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
Thanks for any suggestion.
// 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,
sws_scale(img_convert_ctx, inFrame->data, inFrame->linesize, 0, outHeight,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user