Fix DXVA2 chroma subsampling assuming interlaced content

This commit is contained in:
Cameron Gutman 2023-08-19 18:09:07 -05:00
parent 9dc96bda58
commit 626fba4a8f

View file

@ -1109,14 +1109,17 @@ void DXVA2Renderer::renderFrame(AVFrame *frame)
switch (frame->chroma_location) {
case AVCHROMA_LOC_LEFT:
m_Desc.SampleFormat.VideoChromaSubsampling = DXVA2_VideoChromaSubsampling_Horizontally_Cosited |
DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes;
DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes |
DXVA2_VideoChromaSubsampling_ProgressiveChroma;
break;
case AVCHROMA_LOC_CENTER:
m_Desc.SampleFormat.VideoChromaSubsampling = DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes;
m_Desc.SampleFormat.VideoChromaSubsampling = DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes |
DXVA2_VideoChromaSubsampling_ProgressiveChroma;
break;
case AVCHROMA_LOC_TOPLEFT:
m_Desc.SampleFormat.VideoChromaSubsampling = DXVA2_VideoChromaSubsampling_Horizontally_Cosited |
DXVA2_VideoChromaSubsampling_Vertically_Cosited;
DXVA2_VideoChromaSubsampling_Vertically_Cosited |
DXVA2_VideoChromaSubsampling_ProgressiveChroma;
break;
default:
m_Desc.SampleFormat.VideoChromaSubsampling = DXVA2_VideoChromaSubsampling_Unknown;