[Ffmpeg-devel] getting green area at the bottom with sws_scale
Karl H. Beckers
karl.h.beckers
Thu Oct 26 02:43:06 CEST 2006
Hi all,
am trying to use make migrate from img_convert / img_resample to
sws_scale.
Now, this all works well as long as I actually only do the img_convert
bit and do not try to resize the image at the same time. If I do, I get
a green area at the bottom of the picture.
If you look here, you will see that the first works:
http://www.jarre-de-the.net/computing/no-resize-works.png
and with resize it does not:
http://www.jarre-de-the.net/computing/resize-does-not-work.png
The part of the picture that does get painted looks alright though. I
suppose, if I had done the linesize incorrectly, I wouldn't be getting
exactly the same horizontal portion of the screen. And input and output
heights are obvious ... and even in the broken screenshot mplayer makes
its windows have the correct height.
I'm doing ...
img_resample_ctx = sws_getContext(
image->width,
image->height,
input_pixfmt,
out_st->codec->width,
out_st->codec->height,
out_st->codec->pix_fmt,
1, NULL, NULL, NULL);
once for the video, and then ...
sws_scale(img_resample_ctx, p_inpic->data, p_inpic->linesize,
0, out_st->codec->height, p_outpic->data,
p_outpic->linesize);
Pointers would be very welcome,
thanks,
Karl.
More information about the ffmpeg-devel
mailing list