[vlc-devel] [PATCH 38/39] video_chroma:direct3d: only copy the visible lines to the CPU planes
Steve Lhomme
robux4 at videolabs.io
Fri Jun 2 16:46:41 CEST 2017
---
modules/video_chroma/d3d11_surface.c | 7 ++++---
modules/video_chroma/dxa9.c | 5 +++--
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/modules/video_chroma/d3d11_surface.c b/modules/video_chroma/d3d11_surface.c
index 4de56025b9..f626df6f31 100644
--- a/modules/video_chroma/d3d11_surface.c
+++ b/modules/video_chroma/d3d11_surface.c
@@ -358,7 +358,7 @@ static void D3D11_YUY2(filter_t *p_filter, picture_t *src, picture_t *dst)
};
CopyFromYv12ToYv12(dst, plane, pitch,
- src->format.i_height, &sys->cache);
+ src->format.i_visible_height + src->format.i_y_offset, &sys->cache);
} else if (desc.Format == DXGI_FORMAT_NV12) {
uint8_t *plane[2] = {
lock.pData,
@@ -369,7 +369,7 @@ static void D3D11_YUY2(filter_t *p_filter, picture_t *src, picture_t *dst)
lock.RowPitch,
};
CopyFromNv12ToYv12(dst, plane, pitch,
- src->format.i_height, &sys->cache);
+ src->format.i_visible_height + src->format.i_y_offset, &sys->cache);
} else {
msg_Err(p_filter, "Unsupported D3D11VA conversion from 0x%08X to YV12", desc.Format);
}
@@ -476,7 +476,8 @@ static void D3D11_NV12(filter_t *p_filter, picture_t *src, picture_t *dst)
lock.RowPitch,
lock.RowPitch,
};
- CopyFromNv12ToNv12(dst, plane, pitch, src->format.i_height, &sys->cache);
+ CopyFromNv12ToNv12(dst, plane, pitch,
+ src->format.i_visible_height + src->format.i_y_offset, &sys->cache);
} else {
msg_Err(p_filter, "Unsupported D3D11VA conversion from 0x%08X to NV12", desc.Format);
}
diff --git a/modules/video_chroma/dxa9.c b/modules/video_chroma/dxa9.c
index bc4a821c37..ca30f93563 100644
--- a/modules/video_chroma/dxa9.c
+++ b/modules/video_chroma/dxa9.c
@@ -118,7 +118,7 @@ static void DXA9_YV12(filter_t *p_filter, picture_t *src, picture_t *dst)
lock.Pitch,
};
CopyFromNv12ToYv12(dst, plane, pitch,
- src->format.i_height, p_copy_cache);
+ src->format.i_visible_height + src->format.i_y_offset, p_copy_cache);
} else {
msg_Err(p_filter, "Unsupported DXA9 conversion from 0x%08X to YV12", desc.Format);
}
@@ -152,7 +152,8 @@ static void DXA9_NV12(filter_t *p_filter, picture_t *src, picture_t *dst)
lock.Pitch,
lock.Pitch,
};
- CopyFromNv12ToNv12(dst, plane, pitch, src->format.i_height, p_copy_cache);
+ CopyFromNv12ToNv12(dst, plane, pitch,
+ src->format.i_visible_height + src->format.i_y_offset, p_copy_cache);
} else {
msg_Err(p_filter, "Unsupported DXA9 conversion from 0x%08X to NV12", desc.Format);
}
--
2.12.1
More information about the vlc-devel
mailing list