There is a commentary in the source code of sws_scale, saying about flipping. I read the code it a little, and I thought that swapping the srcSliceY with srcSliceH should do the trick, but instead I got a gray image. On Fri, Jan 9, 2009 at 9:49 AM, Ivo <ivop at euronet.nl> wrote:
On Friday 09 January 2009 10:30, V?ctor Paesa wrote:
Romulo Fernandes said:
I'm using libswscale to scale and convert pixel format from frames that I capture from the screen. In my windows build the frames that I capture are in DIB format. I'm using FFMPEG SVN rev 16437.
Calling sws_scale normally I get the image correctly, except that it's vertically flipped.
If I change the srcSliceY from 0 to srcHeight and srcSliceH from srcHeight to 0, I get a grey image (with correct dimensions). If I keep the srcSliceY in 0 and change srcSliceH from srcHeight to -srcHeight, I also get that grey image.
Is there a way to make sws_scale flip the image for me ?
I faintly recall that using a negative value for some vertical parameter flips it. Don't remember more, you'll need to search the mail archives or run some experiments.
I am not sure on the details either anymore (has been a while since I last worked on swscale), but I think you can use a negative stride for either the source or the destination image. In that case, you also need to point to the last scanline, instead of the first.
--Ivo _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user