OSDN Git Service

drm/sun4i: sun8i-csc: Add support for color encoding and range
authorJernej Skrabec <jernej.skrabec@siol.net>
Sat, 13 Jul 2019 12:03:46 +0000 (14:03 +0200)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Sat, 20 Jul 2019 05:38:09 +0000 (07:38 +0200)
commitb72cb0dc4c46fe75a52a9adb4a13ba1213e50000
tree66ca73f53da7b226cc26dc2d2a7d80f594322fec
parentab38c3b7c3472a6626aceb12fc2a23828152daf3
drm/sun4i: sun8i-csc: Add support for color encoding and range

Conversion from YUV to RGB depends on range (limited or full) and
encoding (BT.601 or BT.709). Current code doesn't consider this and
always uses BT.601 encoding and limited range.

Fix this by introducing new CSC matrices, which are selected based on
range and encoding parameters.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190713120346.30349-4-jernej.skrabec@siol.net
drivers/gpu/drm/sun4i/sun8i_csc.c
drivers/gpu/drm/sun4i/sun8i_csc.h
drivers/gpu/drm/sun4i/sun8i_vi_layer.c