[vlc-commits] direct3d11: fix the pixel per channel for multi planar formats
Steve Lhomme
git at videolan.org
Thu Feb 15 16:40:03 CET 2018
vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Feb 15 15:26:29 2018 +0100| [88bf18258a849dc1f142507479bdedd47d2b10e8] | committer: Thomas Guillem
direct3d11: fix the pixel per channel for multi planar formats
(cherry picked from commit 51142e1f09f6a78f99aeba43a1e39255e4027065)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=88bf18258a849dc1f142507479bdedd47d2b10e8
---
modules/video_output/win32/direct3d11.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index ab2a31e939..264cd12427 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1627,7 +1627,9 @@ 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 / p_format->pixel_size;
+ bits_per_channel = p_format == NULL ||
+ p_format->pixel_bits == 0 ? 8 : p_format->pixel_bits /
+ (p_format->plane_count==1 ? p_format->pixel_size : 1);
}
break;
}
More information about the vlc-commits
mailing list