[media] vivid-tpg: correctly average the two pixels in gen_twopix()
authorHans Verkuil <hans.verkuil@cisco.com>
Sat, 7 Mar 2015 17:15:25 +0000 (14:15 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 2 Apr 2015 23:40:17 +0000 (20:40 -0300)
commit1f088dc162ff191b95d4737d9a3664d8b6a4fca8
tree6e6576fa9cd0e054bb7d586633148a42b4c124fe
parent5d7c539e194af598a8f8d8f616ce97581f3d079a
[media] vivid-tpg: correctly average the two pixels in gen_twopix()

gen_twopix() is always called twice: once for the first and once for
the second pixel. Improve the code to properly average the two if the
format requires horizontal downsampling.

This is necessary for patterns like 1x1 red/blue checkers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/vivid/vivid-tpg.c