• Hans Verkuil's avatar
    [media] vivid-tpg: precalculate downsampled lines · 5d7c539e
    Hans Verkuil authored
    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: default avatarHans Verkuil <hans.verkuil@cisco.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
    5d7c539e
vivid-tpg.h 12.7 KB