[media] vivid-tpg: precalculate downsampled lines
authorHans Verkuil <hans.verkuil@cisco.com>
Sat, 7 Mar 2015 17:06:43 +0000 (14:06 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 2 Apr 2015 23:39:07 +0000 (20:39 -0300)
commit5d7c539e194af598a8f8d8f616ce97581f3d079a
treeeb5a1eef4ff5adf1f98e48278763812de3e1af25
parentba01f673e031ade4f60583ab1ac4f06dd260a972
[media] vivid-tpg: precalculate downsampled lines

When dealing with vertical downsampling two successive lines have to be
averaged. In the case of the test pattern generator that only happens
if the two lines are using different patterns. So precalculate the average
between two pattern lines: one of pattern P and one of pattern P + 1.

That way there is no need to do any on-the-fly downsampling: it's all done
in the precalculate phase.

This patch also implements horizontal downsampling in the precalculate phase.
The only thing that needs to be done is to half the width since the actual
downsampling happens when two pixels at a time are generated.

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
drivers/media/platform/vivid/vivid-tpg.h
This page took 0.025346 seconds and 5 git commands to generate.