summaryrefslogtreecommitdiff
path: root/drivers/media/platform/ti-vpe/csc.h
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2013-12-12 12:36:02 +0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-07 12:57:08 +0400
commit6c4f4cbb585bbb124cadc2ed6ef7b8aeae5ce82e (patch)
tree4506dab07334e06593cd5f13cfaa279cef8cecea /drivers/media/platform/ti-vpe/csc.h
parent6948082d1c9d5cdebc00b317b3b290292c635d53 (diff)
downloadlinux-6c4f4cbb585bbb124cadc2ed6ef7b8aeae5ce82e.tar.xz
[media] v4l: ti-vpe: Add helper to perform color conversion
The CSC block can be used for color space conversion between YUV and RGB formats. It is configurable via a programmable set of coefficients. Add functionality to choose the appropriate CSC coefficients and program them in the CSC registers. We take the source and destination colorspace formats as the arguments, and choose the coefficient table accordingly. YUV to RGB coefficients are provided for standard and high definition colorspaces. The coefficients can also be limited or full range. For now, only full range coefficients are chosen. We would need some sort of control ioctl for the user to specify the range needed. Not sure if there is a generic control ioctl for this already? Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/ti-vpe/csc.h')
-rw-r--r--drivers/media/platform/ti-vpe/csc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/platform/ti-vpe/csc.h b/drivers/media/platform/ti-vpe/csc.h
index 57b5ed600394..1ad2b6dad561 100644
--- a/drivers/media/platform/ti-vpe/csc.h
+++ b/drivers/media/platform/ti-vpe/csc.h
@@ -60,6 +60,9 @@ struct csc_data {
void csc_dump_regs(struct csc_data *csc);
void csc_set_coeff_bypass(struct csc_data *csc, u32 *csc_reg5);
+void csc_set_coeff(struct csc_data *csc, u32 *csc_reg0,
+ enum v4l2_colorspace src_colorspace,
+ enum v4l2_colorspace dst_colorspace);
struct csc_data *csc_create(struct platform_device *pdev);
#endif