Commit dd38813a authored by David I. Lehn's avatar David I. Lehn

Patch from Manfred Weihs <e9525662@student.tuwien.ac.at> to stop X11 driver

from segfaulting on non-32bit displays.
parent aafa9696
......@@ -454,9 +454,24 @@ display_slice(uint_8 *src[], uint_32 slice_num)
dst = ImageData + image_width * 16 * (bpp/8) * slice_num;
yuv2rgb(dst , src[0], src[1], src[2],
image_width, 16,
image_width*4, image_width, image_width/2 );
if (bpp==32)
{
yuv2rgb(dst, src[0], src[1], src[2],
image_width, 16,
image_width*4, image_width, image_width/2 );
}
else if (bpp == 24)
{
yuv2rgb(dst, src[0], src[1], src[2],
image_width, 16,
image_width*3, image_width, image_width/2 );
}
else if (bpp == 15 || bpp == 16)
{
yuv2rgb(dst, src[0], src[1], src[2],
image_width, 16,
image_width*2, image_width, image_width/2 );
}
return 0;
}
......
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