winegstreamer: Use RGB15/16 formats instead of BGR15/16.

Gstreamer stores the first component in the most significant bits, same as DirectShow.

Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Anton Baskanov 2020-10-07 01:04:56 +07:00 committed by Alexandre Julliard
parent 06cbf19923
commit e47b45e2f5
1 changed files with 4 additions and 4 deletions

View File

@ -194,11 +194,11 @@ static gboolean amt_from_gst_video_info(const GstVideoInfo *info, AM_MEDIA_TYPE
amt->subtype = MEDIASUBTYPE_RGB24; amt->subtype = MEDIASUBTYPE_RGB24;
bih->biBitCount = 24; bih->biBitCount = 24;
break; break;
case GST_VIDEO_FORMAT_BGR16: case GST_VIDEO_FORMAT_RGB16:
amt->subtype = MEDIASUBTYPE_RGB565; amt->subtype = MEDIASUBTYPE_RGB565;
bih->biBitCount = 16; bih->biBitCount = 16;
break; break;
case GST_VIDEO_FORMAT_BGR15: case GST_VIDEO_FORMAT_RGB15:
amt->subtype = MEDIASUBTYPE_RGB555; amt->subtype = MEDIASUBTYPE_RGB555;
bih->biBitCount = 16; bih->biBitCount = 16;
break; break;
@ -380,8 +380,8 @@ static GstCaps *amt_to_gst_caps_video(const AM_MEDIA_TYPE *mt)
{&MEDIASUBTYPE_ARGB32, GST_VIDEO_FORMAT_BGRA}, {&MEDIASUBTYPE_ARGB32, GST_VIDEO_FORMAT_BGRA},
{&MEDIASUBTYPE_RGB32, GST_VIDEO_FORMAT_BGRx}, {&MEDIASUBTYPE_RGB32, GST_VIDEO_FORMAT_BGRx},
{&MEDIASUBTYPE_RGB24, GST_VIDEO_FORMAT_BGR}, {&MEDIASUBTYPE_RGB24, GST_VIDEO_FORMAT_BGR},
{&MEDIASUBTYPE_RGB565, GST_VIDEO_FORMAT_BGR16}, {&MEDIASUBTYPE_RGB565, GST_VIDEO_FORMAT_RGB16},
{&MEDIASUBTYPE_RGB555, GST_VIDEO_FORMAT_BGR15}, {&MEDIASUBTYPE_RGB555, GST_VIDEO_FORMAT_RGB15},
}; };
const VIDEOINFOHEADER *vih = (VIDEOINFOHEADER *)mt->pbFormat; const VIDEOINFOHEADER *vih = (VIDEOINFOHEADER *)mt->pbFormat;