Commit 8fcdca9d authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz/vmr9: Support YUV formats in the VMR7.

parent 7595461f
...@@ -417,6 +417,9 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE ...@@ -417,6 +417,9 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE
if (!is_vmr9(filter)) if (!is_vmr9(filter))
{ {
switch (filter->bmiheader.biCompression)
{
case BI_RGB:
switch (filter->bmiheader.biBitCount) switch (filter->bmiheader.biBitCount)
{ {
case 24: info.Format = D3DFMT_R8G8B8; break; case 24: info.Format = D3DFMT_R8G8B8; break;
...@@ -428,6 +431,21 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE ...@@ -428,6 +431,21 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE
} }
info.dwFlags = VMR9AllocFlag_TextureSurface; info.dwFlags = VMR9AllocFlag_TextureSurface;
break;
case mmioFOURCC('N','V','1','2'):
case mmioFOURCC('U','Y','V','Y'):
case mmioFOURCC('Y','U','Y','2'):
case mmioFOURCC('Y','V','1','2'):
info.Format = filter->bmiheader.biCompression;
info.dwFlags = VMR9AllocFlag_OffscreenSurface;
break;
default:
WARN("Unhandled video compression %#x.\n", filter->bmiheader.biCompression);
free(filter->surfaces);
return VFW_E_TYPE_NOT_ACCEPTED;
}
if (FAILED(hr = initialize_device(filter, &info, count))) if (FAILED(hr = initialize_device(filter, &info, count)))
free(filter->surfaces); free(filter->surfaces);
return hr; return hr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment