• Guennadi Liakhovetski's avatar
    V4L/DVB (12522): sh-mobile-ceu-camera: implement host-side cropping · 0f6b0697
    Guennadi Liakhovetski authored
    Not all video capture devices can configure arbitrary cropping, whereas the
    CEU module on SuperH CPUs can crop with pixel precision. However, we want to
    use camera cropping if possible to save bandwidth and increase the frame-rate.
    This patch verifies whether the camera managed to crop exactly the requested
    rectangle, and if not, uses host-side cropping. To be able to crop on CEU we
    have to preserve camera rectangle too, for which the host_priv member in
    struct soc_camera_device is used. We now allocate memory dynamically, thus we
    have to use the .put_formats() method from struct soc_camera_host_ops to free
    it.
    Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    0f6b0697
sh_mobile_ceu_camera.c 33.2 KB