• Ming Qian's avatar
    media: imx-jpeg: Align upwards buffer size · 9e7aa76c
    Ming Qian authored
    The hardware can support any image size WxH,
    with arbitrary W (image width) and H (image height) dimensions.
    
    Align upwards buffer size for both encoder and decoder.
    and leave the picture resolution unchanged.
    
    For decoder, the risk of memory out of bounds can be avoided.
    For both encoder and decoder, the driver will lift the limitation of
    resolution alignment.
    
    For example, the decoder can support jpeg whose resolution is 227x149
    the encoder can support nv12 1080P, won't change it to 1920x1072.
    
    Fixes: 2db16c6e
    
     ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder")
    Signed-off-by: default avatarMing Qian <ming.qian@nxp.com>
    Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
    9e7aa76c
mxc-jpeg.c 67.9 KB