linux/include/video
Steve Longerbeam f208b26e61 gpu: ipu-v3: ipu-ic: Fully describe colorspace conversions
Only providing the input and output RGB/YUV space to the IC task init
functions is not sufficient. To fully characterize a colorspace
conversion, the Y'CbCr encoding standard, and quantization also
need to be specified.

Define a 'struct ipu_ic_colorspace' that includes all the above.

This allows to actually enforce the fact that the IC:

- can only encode to/from YUV and RGB full range. A follow-up patch will
  remove this restriction.
- can only encode using BT.601 standard. A follow-up patch will add
  Rec.709 encoding support.

The determination of the CSC coefficients based on the input/output
'struct ipu_ic_colorspace' are moved to a new exported function
ipu_ic_calc_csc(), and 'struct ic_csc_params' is exported as
'struct ipu_ic_csc_params'. ipu_ic_calc_csc() fills a 'struct ipu_ic_csc'
with the input/output 'struct ipu_ic_colorspace' and the calculated
'struct ic_csc_params' from those input/output colorspaces.

The functions ipu_ic_task_init(_rsc)() now take a filled 'struct
ipu_ic_csc'.

The existing CSC coefficient tables and ipu_ic_calc_csc() are moved
to a new module ipu-ic-csc.c. This is in preparation for adding more
coefficient tables for limited range quantization and more encoding
standards.

The existing ycbcr2rgb and inverse rgb2ycbcr tables defined the BT.601
Y'CbCr encoding coefficients. The rgb2ycbcr table specifically described
the BT.601 encoding from full range RGB to full range YUV. Table
comments have been added in ipu-ic-csc.c to make this more clear.

The ycbcr2rgb inverse table described encoding YUV limited range to RGB
full range. To be consistent with the rgb2ycbcr table, this table is
converted to YUV full range to RGB full range, and the comments are
expanded in ipu-ic-csc.c.

The ic_csc_rgb2rgb table was just an identity matrix, so it is renamed
'identity' in ipu-ic-csc.c.

Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
[p.zabel@pengutronix.de: removed a superfluous blank line]
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2019-06-14 15:31:45 +02:00
..
atmel_lcdc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
aty128.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
broadsheetfb.h broadsheetfb: support storing waveform 2010-03-12 15:52:34 -08:00
cirrus.h cirrusfb: Laguna chipset 8bpp fix 2009-04-01 08:59:27 -07:00
cvisionppc.h
da8xx-fb.h video: da8xx-fb: improve readability of code 2013-08-09 14:02:42 +03:00
display_timing.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 428 2019-06-05 17:37:16 +02:00
edid.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gbe.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 351 2019-06-05 17:37:08 +02:00
hecubafb.h
ili9320.h fb: add support for the ILI9320 video display controller 2008-07-24 10:47:40 -07:00
imx-ipu-image-convert.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
imx-ipu-v3.h gpu: ipu-v3: ipu-ic: Fully describe colorspace conversions 2019-06-14 15:31:45 +02:00
kyro.h drivers/video/fbdev/kyrofb: Use arch_phys_wc_add() and pci_ioremap_wc_bar() 2015-08-25 09:59:44 +02:00
mach64.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
maxinefb.h
mbxfb.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
metronomefb.h [ARM] 5209/1: metronomefb: changes to use platform framebuffer 2008-08-26 17:01:12 +01:00
mipi_display.h drm: Add support for pps and compression mode command packet 2018-07-25 07:51:05 -04:00
mmp_disp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
neomagic.h video: fbdev: neofb: use arch_phys_wc_add() and ioremap_wc() 2015-06-03 12:41:49 +03:00
newport.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
of_display_timing.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 428 2019-06-05 17:37:16 +02:00
of_videomode.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 428 2019-06-05 17:37:16 +02:00
omap-panel-data.h omapdss: omap-panel-data.h: Remove connector_type from atv pdata 2016-06-03 16:06:32 +03:00
omapfb_dss.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
omapvrfb.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
permedia2.h
platform_lcd.h drivers/video/backlight/platform_lcd.c: introduce probe callback 2013-04-29 18:28:18 -07:00
pm3fb.h
pmag-ba-fb.h
pmagb-b-fb.h
pxa168fb.h video: pxa168fb: Cleanup pxa168fb.h file 2014-01-17 10:57:43 +02:00
radeon.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
s1d13xxxfb.h s1d13xxxfb: drop unused code 2010-12-21 01:05:43 +09:00
sa1100fb.h FB: sa1100: remove global sa1100fb_.*_power function pointers 2012-02-21 11:56:19 +00:00
samsung_fimd.h drm/exynos: fimd: Make pixel blend mode configurable 2018-12-14 15:46:15 +09:00
sh_mobile_lcdc.h video: fbdev: sh_mobile_lcdcfb: remove unused MERAM support 2018-05-14 15:47:30 +02:00
sisfb.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 27 2019-05-24 17:27:10 +02:00
sstfb.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tdfx.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tgafb.h
trident.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
udlfb.h udlfb: introduce a rendering mutex 2019-04-01 17:46:57 +02:00
uvesafb.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vga.h arch, drivers: don't include <asm/io.h> directly, use <linux/io.h> instead 2015-08-10 23:07:05 -04:00
videomode.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 428 2019-06-05 17:37:16 +02:00
w100fb.h