[vlc-devel] [PATCH] direct3d11: support YV12 which works better with DXVA2
Jean-Baptiste Kempf
jb at videolan.org
Wed Apr 1 12:19:38 CEST 2015
On 01 Apr, Steve Lhomme wrote :
> --
> swscale won't be needed between DXVA2 and D3D11
This cannot be right.
U and V are inverted between I420 and YV12.
> ---
> modules/video_output/msw/direct3d11.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/modules/video_output/msw/direct3d11.c b/modules/video_output/msw/direct3d11.c
> index 8ce639d..d9a140f 100644
> --- a/modules/video_output/msw/direct3d11.c
> +++ b/modules/video_output/msw/direct3d11.c
> @@ -74,6 +74,7 @@ typedef struct
>
> static const d3d_format_t d3d_formats[] = {
> { "I420", DXGI_FORMAT_NV12, VLC_CODEC_I420, DXGI_FORMAT_R8_UNORM, DXGI_FORMAT_R8G8_UNORM },
> + { "YV12", DXGI_FORMAT_NV12, VLC_CODEC_YV12, DXGI_FORMAT_R8_UNORM, DXGI_FORMAT_R8G8_UNORM },
> { "NV12", DXGI_FORMAT_NV12, VLC_CODEC_NV12, DXGI_FORMAT_R8_UNORM, DXGI_FORMAT_R8G8_UNORM },
> #ifdef BROKEN_PIXEL
> { "YUY2", DXGI_FORMAT_YUY2, VLC_CODEC_I422, DXGI_FORMAT_R8G8B8A8_UNORM, 0 },
> @@ -749,6 +750,7 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
> else
> sys->d3dPxShader = globPixelShaderBiplanarYUV_BT601_2RGB;
> break;
> + case VLC_CODEC_YV12:
> case VLC_CODEC_I420:
> if( fmt->i_height > 576 )
> sys->d3dPxShader = globPixelShaderBiplanarI420_BT709_2RGB;
> --
> 2.3.0
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the vlc-devel
mailing list