d3d11_surface: no matter what the texture height is given by the texture description
authorSteve Lhomme <robux4@videolabs.io>
Tue, 23 May 2017 11:47:08 +0000 (13:47 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 13 Jun 2017 12:44:03 +0000 (14:44 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/video_chroma/d3d11_surface.c

index 929e3b9..26196f7 100644 (file)
@@ -144,9 +144,9 @@ static void D3D11_YUY2(filter_t *p_filter, picture_t *src, picture_t *dst)
 
         uint8_t *plane[3] = {
             (uint8_t*)lock.pData,
-            (uint8_t*)lock.pData + pitch[0] * src->format.i_height,
-            (uint8_t*)lock.pData + pitch[0] * src->format.i_height
-                                 + pitch[1] * src->format.i_height / 2,
+            (uint8_t*)lock.pData + pitch[0] * desc.Height,
+            (uint8_t*)lock.pData + pitch[0] * desc.Height
+                                 + pitch[1] * desc.Height / 2,
         };
 
         CopyFromYv12ToYv12(dst, plane, pitch,
@@ -154,7 +154,7 @@ static void D3D11_YUY2(filter_t *p_filter, picture_t *src, picture_t *dst)
     } else if (desc.Format == DXGI_FORMAT_NV12) {
         uint8_t *plane[2] = {
             lock.pData,
-            (uint8_t*)lock.pData + lock.RowPitch * src->format.i_height
+            (uint8_t*)lock.pData + lock.RowPitch * desc.Height
         };
         size_t  pitch[2] = {
             lock.RowPitch,
@@ -214,7 +214,7 @@ static void D3D11_NV12(filter_t *p_filter, picture_t *src, picture_t *dst)
     if (desc.Format == DXGI_FORMAT_NV12) {
         uint8_t *plane[2] = {
             lock.pData,
-            (uint8_t*)lock.pData + lock.RowPitch * src->format.i_height
+            (uint8_t*)lock.pData + lock.RowPitch * desc.Height
         };
         size_t  pitch[2] = {
             lock.RowPitch,