From 5d7c539e194af598a8f8d8f616ce97581f3d079a Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 7 Mar 2015 14:06:43 -0300 Subject: [PATCH] [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 Signed-off-by: Mauro Carvalho Chehab --- Reading git-format-patch failed