demux_mf: support .xbm

And support the PIX_FMT_MONOWHITE pixel format. (This is really weird:
unlike PIX_FMT_MONOBLACK, it uses white pixels. I have no idea why
libavcodec doesn't just convert the pixel format on the fly, instead of
bothering everyone with really special pixel formats.)
This commit is contained in:
wm4 2013-02-24 16:51:29 +01:00
parent edddf81232
commit 90efe7cf48
4 changed files with 4 additions and 0 deletions

View File

@ -127,6 +127,7 @@ static const struct {
{ "im8", "sunrast" },
{ "im24", "sunrast" },
{ "sunras", "sunrast" },
{ "xbm", "xbm" },
{0}
};

View File

@ -132,6 +132,7 @@ static const unsigned int outfmt_list[]={
IMGFMT_RGB4_BYTE,
IMGFMT_BGR4_BYTE,
IMGFMT_MONO,
IMGFMT_MONO_W,
0
};

View File

@ -38,6 +38,7 @@ static const struct {
{IMGFMT_BGR8, PIX_FMT_RGB8},
{IMGFMT_BGR4, PIX_FMT_RGB4},
{IMGFMT_MONO, PIX_FMT_MONOBLACK},
{IMGFMT_MONO_W, PIX_FMT_MONOWHITE},
{IMGFMT_RGB4_BYTE, PIX_FMT_BGR4_BYTE},
{IMGFMT_BGR4_BYTE, PIX_FMT_RGB4_BYTE},
{IMGFMT_RGB48_LE, PIX_FMT_RGB48LE},

View File

@ -197,6 +197,7 @@ enum mp_imgfmt {
IMGFMT_RGB4, // r1 g2 b1, bit-packed
IMGFMT_BGR4,
IMGFMT_MONO, // 1 bit per pixel, bit-packed
IMGFMT_MONO_W, // like IMGFMT_MONO, but inverted (white pixels)
// Accessed with bit-shifts after endian-swapping the uint16_t pixel
IMGFMT_RGB12_LE, // 4r 4g 4b 4a (LSB to MSB)