Commit 51142e1f authored by Steve Lhomme's avatar Steve Lhomme

direct3d11: fix the pixel per channel for multi planar formats

parent 7adbad29
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment