vlc/vlc-3.0 | branch: master | Steve Lhomme <[email protected]> | Thu Feb 15 
15:43:25 2018 +0100| [1b232faf183a1b4eef75067f8b7bd82ff6a77d23] | committer: 
Thomas Guillem

d3d11_fmt: the texture dimensions don't depend on the pixel width like the pitch

(cherry picked from commit ff6c207c5398c84a8a6f4e67e76fa55fcc32a149)
Signed-off-by: Thomas Guillem <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=1b232faf183a1b4eef75067f8b7bd82ff6a77d23
---

 modules/video_chroma/d3d11_fmt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c
index 210beaf3d3..96835fccca 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -482,8 +482,8 @@ int AllocateTextures( vlc_object_t *obj, d3d11_device_t 
*d3d_dev,
                 textures[picture_count * D3D11_MAX_SHADER_VIEW + plane] = 
slicedTexture;
                 ID3D11Texture2D_AddRef(slicedTexture);
             } else {
-                texDesc.Height = planes[plane].i_lines;
-                texDesc.Width = planes[plane].i_pitch;
+                texDesc.Height = fmt->i_height * p_chroma_desc->p[plane].h.num 
/ p_chroma_desc->p[plane].h.den;
+                texDesc.Width = fmt->i_width * p_chroma_desc->p[plane].w.num / 
p_chroma_desc->p[plane].w.den;
                 hr = ID3D11Device_CreateTexture2D( d3d_dev->d3ddevice, 
&texDesc, NULL, &textures[picture_count * D3D11_MAX_SHADER_VIEW + plane] );
                 if (FAILED(hr)) {
                     msg_Err(obj, "CreateTexture2D failed for the %d pool. 
(hr=0x%0lx)", pool_size, hr);

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to