[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
Hello,
I couldnt 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);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20111222/897eb46f/attachment.html>
More information about the Libav-user
mailing list