• Alberto Panizzo's avatar
    [media] V4L: mx3_camera: fix capture issues for non 8-bit per pixel formats · a48be1d6
    Alberto Panizzo authored
    If the camera was set to output formats like RGB565 YUYV or SBGGR10,
    the resulting image was scrambled due to erroneous interpretations of
    horizontal parameter's units.
    
    This patch in fourcc_to_ipu_pix, eliminate also the pixel formats mappings
    that, first are not used within mainline code and second, standing at
    the datasheets, they will not work properly:
    
    The IPU internal bus support only the following data formatting
    (44.1.1.3 Data Flows and Formats):
     1 YUV 4:4:4 or RGB-8 bits per color component
     2 YUV 4:4:4 or RGB-10 bits per color component
     3 Generic data (from sensor to the system memory only)
    
    And format conversions are done:
     - from memory: unpacking from other formats to IPU supported ones
     - to memory: packing in the inverse order.
    
    So, assigning a packing/unpacking strategy to the IPU for those formats
    will produce a packing to memory and not the inverse.
    Signed-off-by: default avatarAlberto Panizzo <maramaopercheseimorto@gmail.com>
    Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    a48be1d6
mx3_camera.c 36.4 KB