Currently the colors for the Y16 and Y16_BE pixelformats are in the range 0x0000-0xff00. So pure white (0xffff) is never created. Improve this by using the same byte for both LSB and MSB so the full range is achieved. Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx> diff --git a/drivers/media/platform/vivid/vivid-tpg.c b/drivers/media/platform/vivid/vivid-tpg.c index b1147f2..e28f32b 100644 --- a/drivers/media/platform/vivid/vivid-tpg.c +++ b/drivers/media/platform/vivid/vivid-tpg.c @@ -896,16 +896,12 @@ static void gen_twopix(struct tpg_data *tpg, b_v = tpg->colors[color][2]; /* B or precalculated V */ switch (tpg->fourcc) { - case V4L2_PIX_FMT_GREY: - buf[0][offset] = r_y; - break; case V4L2_PIX_FMT_Y16: - buf[0][offset] = 0; - buf[0][offset+1] = r_y; - break; case V4L2_PIX_FMT_Y16_BE: + buf[0][offset+1] = r_y; + /* fall through */ + case V4L2_PIX_FMT_GREY: buf[0][offset] = r_y; - buf[0][offset+1] = 0; break; case V4L2_PIX_FMT_YUV422P: case V4L2_PIX_FMT_YUV420: -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html