• Philipp Zabel's avatar
    media: add v4l2 JPEG helpers · 50733b5b
    Philipp Zabel authored
    Add helpers for JPEG header parsing. They allow both scanning for marker
    segment positions and later parsing the segments individually, as
    required by s5p-jpeg, as well as parsing all headers in one go, as
    required by coda-vpu. The frame header is always parsed, as basically
    all decoders are interested in width, height, and number of components.
    For convenience, the JPEG chroma subsampling factors are decoded into a
    v4l2_jpeg_chroma_subsampling enum.
    
    Only baseline and extended sequential DCT encoded JPEGs with 8-bit or
    12-bit precision with up to four components are supported.
    Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
    Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
    50733b5b
v4l2-jpeg.h 4.16 KB