• Eugen Hristev's avatar
    media: atmel: atmel-isc: reworked white balance feature · 73c1a577
    Eugen Hristev authored
    Reworked auto white balance feature (awb) to cope with all four channels.
    Implemented stretching and grey world algorithms.
    Using the histogram, the ISC will auto adjust the white balance during
    frame captures.
    Because each histogram needs a frame, it will take 4 frames for one adjustment.
    When the gains were updated by previous code, the registers for the gains
    were updated only on new streaming start. Now, after each full histogram the
    registers are updated with new gains.
    Also, on previous code, if the streaming stopped but not all 3 histograms
    finished, a new histogram was started either way. This used to lead to an
    error "timeout to update profile" when streaming was stopped.
    According to the hardware, histogram can only work together with the capture,
    not independently.
    Signed-off-by: default avatarEugen Hristev <eugen.hristev@microchip.com>
    Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
    73c1a577
atmel-isc-regs.h 8.12 KB