Video containing negative biHeight cannot be displayed from VLC
I have read Windows forums and the negative biHeight is a standard way how to invert y axis.
My own simple application displays such a video correctly through direct show: http://www.penguin.cz/~fojtik/CamView/
I can provide for you virtual camera windows driver - avshws clone that could demonstrate this issue. Of course if you have some interest. Even I can get it signed it it helps.
Camera declared properties:
/// FormatRGB32Bpp_Capture:
/// This is the data range description of the RGB32 capture format we support.
const KS_DATARANGE_VIDEO FormatRGB32Bpp_Capture = {
//
// KSDATARANGE
//
{
sizeof(KS_DATARANGE_VIDEO), // FormatSize
0, // Flags
D_X * D_Y * 4, // SampleSize
0, // Reserved
STATICGUIDOF (KSDATAFORMAT_TYPE_VIDEO), // aka. MEDIATYPE_Video
0xe436eb7e, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70, // aka. MEDIASUBTYPE_RGB32,
STATICGUIDOF (KSDATAFORMAT_SPECIFIER_VIDEOINFO) // aka. FORMAT_VideoInfo
},
TRUE, // BOOL, bFixedSizeSamples (all samples same size?)
FALSE, // BOOL, bTemporalCompression (all I frames?)
0, // Reserved (was StreamDescriptionFlags)
0, // Reserved (was MemoryAllocationFlags
// (KS_VIDEO_ALLOC_*))
//
// _KS_VIDEO_STREAM_CONFIG_CAPS
//
{
STATICGUIDOF( KSDATAFORMAT_SPECIFIER_VIDEOINFO ), // GUID
KS_AnalogVideo_None, // AnalogVideoStandard
D_X,D_Y, // InputSize, (the inherent size of the incoming signal
// with every digitized pixel unique)
D_X,D_Y, // MinCroppingSize, smallest rcSrc cropping rect allowed
D_X,D_Y, // MaxCroppingSize, largest rcSrc cropping rect allowed
8, // CropGranularityX, granularity of cropping size
1, // CropGranularityY
8, // CropAlignX, alignment of cropping rect
1, // CropAlignY;
D_X, D_Y, // MinOutputSize, smallest bitmap stream can produce
D_X, D_Y, // MaxOutputSize, largest bitmap stream can produce
8, // OutputGranularityX, granularity of output bitmap size
1, // OutputGranularityY;
0, // StretchTapsX (0 no stretch, 1 pix dup, 2 interp...)
0, // StretchTapsY
0, // ShrinkTapsX
0, // ShrinkTapsY
333667, // MinFrameInterval, 100 nS units
640000000, // MaxFrameInterval, 100 nS units
8 * 4 * 30 * D_X * D_Y, // MinBitsPerSecond;
8 * 4 * 30 * D_X * D_Y // MaxBitsPerSecond;
},
//
// KS_VIDEOINFOHEADER (default format)
//
{
0,0,0,0, // RECT rcSource;
0,0,0,0, // RECT rcTarget;
D_X * D_Y * 4 * 8 * 30, // DWORD dwBitRate;
0L, // DWORD dwBitErrorRate;
333667, // REFERENCE_TIME AvgTimePerFrame;
sizeof (KS_BITMAPINFOHEADER), // DWORD biSize;
D_X, // LONG biWidth;
-D_Y, // LONG biHeight;
1, // WORD biPlanes;
32, // WORD biBitCount;
KS_BI_RGB, // DWORD biCompression;
D_X * D_Y * 4, // DWORD biSizeImage;
0, // LONG biXPelsPerMeter;
0, // LONG biYPelsPerMeter;
0, // DWORD biClrUsed;
0 // DWORD biClrImportant;
}
};