From 1a34bf052d83d8bee9d69349894f9806a9de884a Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Tue, 19 Dec 2017 10:32:02 +0100 Subject: [PATCH] direct3d11: remove EraseYUVBorders() We don't need it anymore now that we don't do interpolation with these extra pixels Signed-off-by: Jean-Baptiste Kempf --- modules/video_output/win32/direct3d11.c | 26 ------------------------- 1 file changed, 26 deletions(-) diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c index 0793db9477..7c3cba8c89 100644 --- a/modules/video_output/win32/direct3d11.c +++ b/modules/video_output/win32/direct3d11.c @@ -416,33 +416,9 @@ static int Direct3D11MapPoolTexture(picture_t *picture) return CommonUpdatePicture(picture, NULL, mappedResource.pData, mappedResource.RowPitch); } -/* add black pixels in the padding to ease the interpolation artefacts */ -static void EraseYUVBorders(int i_planes, plane_t planes[PICTURE_PLANE_MAX]) -{ - for (int i = 0; i < i_planes; i++) - { - uint8_t val = (i == 0) ? 0x00 : 0x80; - if (planes[i].i_visible_lines < planes[i].i_lines) - { - memset(planes[i].p_pixels + (planes[i].i_visible_lines * planes[i].i_pitch), val, planes[i].i_visible_pitch); - } - - if (planes[i].i_visible_pitch < planes[i].i_pitch) - { - for (int j=0; jp_sys; - EraseYUVBorders(picture->i_planes, picture->p); ID3D11DeviceContext_Unmap(p_sys->context, p_sys->resource[KNOWN_DXGI_INDEX], 0); } @@ -1125,8 +1101,6 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic for (i = 0; i < picture->i_planes; i++) plane_CopyPixels(&planes[i], &picture->p[i]); - EraseYUVBorders(picture->i_planes, planes); - for (i = 0; i < picture->i_planes; i++) ID3D11DeviceContext_Unmap(sys->d3d_dev.d3dcontext, sys->stagingSys.resource[i], 0); }