[vlc-devel] [PATCH 3/3] direct3d11: fix the bits per channel

Steve Lhomme robux4 at videolabs.io
Wed Dec 13 10:49:42 CET 2017


We don't want the bits per plane for packed formats.
---
 modules/video_output/win32/direct3d11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 7d2efceb2d..2eeafc4899 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1598,7 +1598,7 @@ static int SetupOutputFormat(vout_display_t *vd, video_format_t *fmt)
         default:
             {
                 const vlc_chroma_description_t *p_format = vlc_fourcc_GetChromaDescription(fmt->i_chroma);
-                bits_per_channel = p_format == NULL || p_format->pixel_bits == 0 ? 8 : p_format->pixel_bits;
+                bits_per_channel = p_format == NULL || p_format->pixel_bits == 0 ? 8 : p_format->pixel_bits / p_format->pixel_size;
             }
             break;
         }
-- 
2.14.2



More information about the vlc-devel mailing list