• Hans de Goede's avatar
    [media] gspca_zc3xx: Fix JPEG quality setting code · 83fb2e2e
    Hans de Goede authored
    The current code is using bits 0-1 of register 8 of the zc3xx controller
    to set the JPEG quality, but the correct bits are bits 1-2. Bit 0 selects
    between truncation or rounding in the quantization phase of the compression,
    since rounding generally gives better results it should thus always be 1.
    
    This patch also corrects the quality percentages which belong to the 4
    different settings.
    
    Last this patch removes the different reg 8 defaults depending on the sensor
    type. Some of them where going for a default quality setting of 50%, which
    generally is not necessary in any way and results in poor image quality.
    75% is a good default to use for all scenarios.
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    83fb2e2e
zc3xx.c 256 KB