Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different Video Formats? #50

Open
teoAlivanoglou opened this issue Jan 11, 2024 · 3 comments
Open

Different Video Formats? #50

teoAlivanoglou opened this issue Jan 11, 2024 · 3 comments

Comments

@teoAlivanoglou
Copy link

teoAlivanoglou commented Jan 11, 2024

Hello. I understand that currently you can only use BGR24 format. It would be great if you could expand to ABGR32 (or a different layout) and or any YUV format. Other than that, it's a great wrapper.

Edit: Is it possible to choose between Progressive and Interlaced?

@tshino
Copy link
Owner

tshino commented Jan 11, 2024

Thank you for the suggestion.
I think it is possible technically.
Probably I would make a few new APIs to add this feature.

@ank-007
Copy link

ank-007 commented Jan 15, 2024

if possible, please add support to JPEG format also, great project btw ;)

@teoAlivanoglou
Copy link
Author

if possible, please add support to JPEG format also, great project btw ;)

I doubt it's possible (or at least viable). Even YUV is a bit of a stretch as you would need to write converters for these formats (as long as you want to stay dependency free).

These, however, should be much more realistic expectations:

// This maps bitmap subtypes into a bits per pixel value and also a
// name. unicode and ansi versions are stored because we have to
// return a pointer to a static string.
const struct {
const GUID *pSubtype;
WORD BitCount;
CHAR *pName;
WCHAR *wszName;
} BitCountMap[] = { &MEDIASUBTYPE_RGB1, 1, "RGB Monochrome", L"RGB Monochrome",
&MEDIASUBTYPE_RGB4, 4, "RGB VGA", L"RGB VGA",
&MEDIASUBTYPE_RGB8, 8, "RGB 8", L"RGB 8",
&MEDIASUBTYPE_RGB565, 16, "RGB 565 (16 bit)", L"RGB 565 (16 bit)",
&MEDIASUBTYPE_RGB555, 16, "RGB 555 (16 bit)", L"RGB 555 (16 bit)",
&MEDIASUBTYPE_RGB24, 24, "RGB 24", L"RGB 24",
&MEDIASUBTYPE_RGB32, 32, "RGB 32", L"RGB 32",
&MEDIASUBTYPE_ARGB32, 32, "ARGB 32", L"ARGB 32",
&MEDIASUBTYPE_Overlay, 0, "Overlay", L"Overlay",
&GUID_NULL, 0, "UNKNOWN", L"UNKNOWN"
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants