[vlc-commits] video_chroma:direct3d: only copy the visible lines to the CPU planes
Steve Lhomme
git at videolan.org
Tue Jun 13 15:00:15 CEST 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Fri Jun 2 10:24:18 2017 +0200| [44fca248e2911a77c006d69758ed6112cb81d1b5] | committer: Jean-Baptiste Kempf
video_chroma:direct3d: only copy the visible lines to the CPU planes
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=44fca248e2911a77c006d69758ed6112cb81d1b5
---
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 26196f7385..e7635f667a 100644
--- a/modules/video_chroma/d3d11_surface.c
+++ b/modules/video_chroma/d3d11_surface.c
@@ -150,7 +150,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,
@@ -161,7 +161,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);
}
@@ -220,7 +220,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 ec1e2d27fc..afd8fc447b 100644
--- a/modules/video_chroma/dxa9.c
+++ b/modules/video_chroma/dxa9.c
@@ -117,7 +117,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);
}
@@ -150,7 +150,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);
}
More information about the vlc-commits
mailing list