[Ffmpeg-devel] Size from grab device

Michael Niedermayer michaelni
Sun Nov 12 02:56:59 CET 2006


Hi

On Sat, Nov 11, 2006 at 11:18:28PM -0200, ramiro at lisha.ufsc.br wrote:
> Hello,
> 
> I'm implementing VFW capture support for Windows, and I've come accross
> two issues. Attached is the source code I'm currently using just so that
> you can see how I'm setting the codec information.
> 
> 1: The image is upside down, mirrorred, and colours swapped, the same way
> as displaying in Windows.
> I'm using PIX_FMT_BGR24 instead of PIX_FMT_RGB24 to swap the colours, but
> I don't know how to invert the image.
> It's easy if I want FFmpeg's output to be inverted. I just set
> BITMAPINFOHEADER's size to negative for my output bmp. But how do I make
> FFmpeg understand an inverted input?

use negative linesize and have data[0] point to the "last" line

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list